<template>
  <div id="recruitTable">
    <el-dialog title="修改最近三年的开始年度" :visible.sync="yearFormVisible" :close-on-click-modal="false" :close-on-press-escape="false">
      <el-form :model="yearForm" ref="yearForm" :inline="true" inline-message>
        <el-form-item prop="yearForm">
          <el-select v-model="yearForm.startYear">
            <el-option v-for="(item,index) in yearList" :key="'year'+index" :value="item" :label="item" />
          </el-select>
          <el-button type="primary" @click.native="setStartYear()" :loading="btnLoading">提交</el-button>
        </el-form-item>
      </el-form>
    </el-dialog>
    <el-dialog title="导入失败原因" :visible.sync="errorVisible" :close-on-click-modal="false" :close-on-press-escape="false">
      <el-table :data="errorList" highlight-current-row>
        <el-table-column prop="index" label="错误序号" width="120" align="center">
        </el-table-column>
        <el-table-column prop="error" label="原因" min-width="150">
        </el-table-column>
      </el-table>
    </el-dialog>
    <!-- <el-button v-if="canEdit" style="float:right" icon="el-icon-setting" type="primary" @click="editStartYear()">修改最近三年的开始年度</el-button> -->
    <template v-if="batchState">
      <el-button icon="el-icon-s-promotion" type="success" style="margin-bottom:20px" @click="setState(1)" v-if="canEdit&&(state===0||state===5)" :loading='btnLoading'>提交</el-button>
      <el-button icon="el-icon-s-release" type="danger" style="margin-bottom:20px" v-if="canAudit&&state===1" @click="showBack()">退回</el-button>
    </template>
    <el-dialog title="退回原因" :visible.sync="backFormVisible" :close-on-click-modal="false" width="700px" :close-on-press-escape="false">
      <el-form :model="backForm" ref="backForm" :inline="true" inline-message>
        <el-form-item prop="remark">
          <el-input v-model="backForm.remark" style="width:600px"></el-input>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click.native="setState(5)" :loading="btnLoading">提交</el-button>
        <el-button @click.native="backFormVisible = false">取消</el-button>
      </div>
    </el-dialog>
    <el-dialog :title="dialogTitle" :visible.sync="editFormVisible1" width="98%" top="20px" :close-on-click-modal="false" :close-on-press-escape="false">
      <el-form :model="editForm1" label-width="200px" ref="editForm1" :inline="true" style="padding:10px 0 0;clear:both" inline-message :rules="editFormRules1">
        <table cellspacing="0" cellpadding="0" class="mytable">
          <tr>
            <th style="width:120px; vertical-align: middle;">单位名称</th>
            <td colspan="7" style="vertical-align: middle;">
              <el-form-item prop="unitName">
                <el-input v-model="editForm1.unitName" style="width:500px"></el-input>
              </el-form-item>
            </td>
          </tr>
          <tr>
            <th style="width:120px; vertical-align: middle;">编制（员工控制数）</th>
            <td style="vertical-align: middle;">
              <el-form-item prop="authorizedPersonCount">
                <el-input-number v-model="editForm1.authorizedPersonCount" />
              </el-form-item>
            </td>
            <th style="width:120px; vertical-align: middle;">其中领导班子职数</th>
            <td colspan="3" style="vertical-align: middle;">
              <el-form-item prop="authorizedLeaderCount">
                <el-input-number v-model="editForm1.authorizedLeaderCount" />
              </el-form-item>
            </td>
            <th rowspan="2" style="width:120px; vertical-align: middle;">拟离退休人数（截至7月底）</th>
            <td rowspan="2" style="vertical-align: middle;">
              <el-form-item prop="retireesCount">
                <el-input-number v-model="editForm1.retireesCount" />
              </el-form-item>
            </td>
          </tr>
          <tr>
            <th style="width:120px; vertical-align: middle;">现有人员数</th>
            <td style="vertical-align: middle;">
              <el-form-item prop="actualPersonCount">
                <el-input-number v-model="editForm1.actualPersonCount" />
              </el-form-item>
            </td>
            <th style="width:120px; vertical-align: middle;">其中领导班子人数</th>
            <td colspan="3" style="vertical-align: middle;">
              <el-form-item prop="actualLeaderCount">
                <el-input-number v-model="editForm1.actualLeaderCount" />
              </el-form-item>
            </td>
          </tr>
          <template v-if='theType1===1&&unitBeijing1===1'>
            <tr>
              <th rowspan="2" style="width:120px; vertical-align: middle;">上一年度年实际接收情况</th>
              <th style="vertical-align: middle;">京内生源</th>
              <th style="vertical-align: middle;">本科生</th>
              <td style="vertical-align: middle;">
                <el-form-item prop="lastYearBeijingBachelorCount">
                  <el-input-number v-model="editForm1.lastYearBeijingBachelorCount" />
                </el-form-item>
              </td>
              <th style="width:120px; vertical-align: middle;">研究生</th>
              <td style="vertical-align: middle;">
                <el-form-item prop="lastYearBeijingPostgraduateCount">
                  <el-input-number v-model="editForm1.lastYearBeijingPostgraduateCount" />
                </el-form-item>
              </td>
              <td style="vertical-align: middle;">小计：{{editForm1.lastYearBeijingBachelorCount+editForm1.lastYearBeijingPostgraduateCount}}人</td>
              <td rowspan="2" style="vertical-align: middle;">京内生源比例：
                {{(editForm1.lastYearBeijingBachelorCount+editForm1.lastYearBeijingPostgraduateCount+editForm1.lastYearBachelorCount+editForm1.lastYearPostgraduateCount)?(100*(editForm1.lastYearBeijingBachelorCount+editForm1.lastYearBeijingPostgraduateCount)/(editForm1.lastYearBeijingBachelorCount+editForm1.lastYearBeijingPostgraduateCount+editForm1.lastYearBachelorCount+editForm1.lastYearPostgraduateCount)).toFixed(1):'0'}}%</td>
            </tr>
            <tr>
              <th style="vertical-align: middle;">京外生源</th>
              <th style="vertical-align: middle;">本科生</th>
              <td style="vertical-align: middle;">
                <el-form-item prop="lastYearBachelorCount">
                  <el-input-number v-model="editForm1.lastYearBachelorCount" />
                </el-form-item>
              </td>
              <th style="width:120px; vertical-align: middle;">研究生</th>
              <td style="vertical-align: middle;">
                <el-form-item prop="lastYearPostgraduateCount">
                  <el-input-number v-model="editForm1.lastYearPostgraduateCount" />
                </el-form-item>
              </td>
              <td style="vertical-align: middle;">小计：{{editForm1.lastYearBachelorCount+editForm1.lastYearPostgraduateCount}}人</td>
            </tr>
            <tr>
              <th rowspan="2" style="width:120px; vertical-align: middle;">本年度需求情况</th>
              <th style="vertical-align: middle;">京内生源</th>
              <th style="vertical-align: middle;">本科生</th>
              <td style="vertical-align: middle;">
                <el-form-item prop="thisYearBeijingBachelorCount">
                  <el-input-number v-model="editForm1.thisYearBeijingBachelorCount" />
                </el-form-item>
              </td>
              <th style="width:120px; vertical-align: middle;">研究生</th>
              <td style="vertical-align: middle;">
                <el-form-item prop="thisYearBeijingPostgraduateCount">
                  <el-input-number v-model="editForm1.thisYearBeijingPostgraduateCount" />
                </el-form-item>
              </td>
              <td style="vertical-align: middle;">小计：{{editForm1.thisYearBeijingBachelorCount+editForm1.thisYearBeijingPostgraduateCount}}人</td>
              <td rowspan="2" style="vertical-align: middle;">京内生源比例：
                {{(editForm1.thisYearBeijingBachelorCount+editForm1.thisYearBeijingPostgraduateCount+editForm1.thisYearBachelorCount+editForm1.thisYearPostgraduateCount)?(100*(editForm1.thisYearBeijingBachelorCount+editForm1.thisYearBeijingPostgraduateCount)/(editForm1.thisYearBeijingBachelorCount+editForm1.thisYearBeijingPostgraduateCount+editForm1.thisYearBachelorCount+editForm1.thisYearPostgraduateCount)).toFixed(1):'0'}}%</td>
            </tr>
            <tr>
              <th style="vertical-align: middle;">京外生源</th>
              <th style="vertical-align: middle;">本科生</th>
              <td style="vertical-align: middle;">
                <el-form-item prop="thisYearBachelorCount">
                  <el-input-number v-model="editForm1.thisYearBachelorCount" />
                </el-form-item>
              </td>
              <th style="width:120px; vertical-align: middle;">研究生</th>
              <td style="vertical-align: middle;">
                <el-form-item prop="thisYearPostgraduateCount">
                  <el-input-number v-model="editForm1.thisYearPostgraduateCount" />
                </el-form-item>
              </td>
              <td style="vertical-align: middle;">小计：{{editForm1.thisYearBachelorCount+editForm1.thisYearPostgraduateCount}}人</td>
            </tr>
          </template>
          <template v-else-if='theType1===1&&unitBeijing1===2'>
            <tr>
              <th style="width:120px; vertical-align: middle;" rowspan="2">上一年度年实际接收情况</th>
              <th style="vertical-align: middle;" rowspan="2">本科生</th>
              <td style="vertical-align: middle;" rowspan="2" colspan="2">
                <el-form-item prop="lastYearBachelorCount">
                  <el-input-number v-model="editForm1.lastYearBachelorCount" />
                </el-form-item>
              </td>
              <th style="width:120px; vertical-align: middle;">硕士研究生</th>
              <td style="vertical-align: middle;" colspan="2">
                <el-form-item prop="lastYearPostgraduateCount">
                  <el-input-number v-model="editForm1.lastYearPostgraduateCount" />
                </el-form-item>
              </td>
              <td style="vertical-align: middle;" rowspan="2">小计：{{editForm1.lastYearBachelorCount+editForm1.lastYearPostgraduateCount+editForm1.thisYearDoctorCount}}人</td>
            </tr>
            <tr>
              <th style="width:120px; vertical-align: middle;">博士研究生</th>
              <td style="vertical-align: middle;" colspan="2">
                <el-form-item prop="thisYearDoctorCount">
                  <el-input-number v-model="editForm1.thisYearDoctorCount" />
                </el-form-item>
              </td>
            </tr>
            <tr>
              <th style="width:120px; vertical-align: middle;">本年度需求情况</th>
              <th style="vertical-align: middle;">本科生</th>
              <td style="vertical-align: middle;" colspan="2">
                <el-form-item prop="thisYearBachelorCount">
                  <el-input-number v-model="editForm1.thisYearBachelorCount" />
                </el-form-item>
              </td>
              <th style="width:120px; vertical-align: middle;">研究生</th>
              <td style="vertical-align: middle;" colspan="2">
                <el-form-item prop="thisYearPostgraduateCount">
                  <el-input-number v-model="editForm1.thisYearPostgraduateCount" />
                </el-form-item>
              </td>
              <td style="vertical-align: middle;">小计：{{editForm1.thisYearBachelorCount+editForm1.thisYearPostgraduateCount}}人</td>
            </tr>
          </template>
          <template v-else-if='theType1===2&&unitBeijing1===1'>
            <tr>
              <th rowspan="2" style="width:120px; vertical-align: middle;">本年度拟申报的应届毕业生招聘计划数</th>
              <th style="vertical-align: middle;">京内生源</th>
              <th style="vertical-align: middle;">本科生</th>
              <td style="vertical-align: middle;">
                <el-form-item prop="thisYearBeijingBachelorCount">
                  <el-input-number v-model="editForm1.thisYearBeijingBachelorCount" />
                </el-form-item>
              </td>
              <th style="width:120px; vertical-align: middle;">研究生</th>
              <td style="vertical-align: middle;">
                <el-form-item prop="thisYearBeijingPostgraduateCount">
                  <el-input-number v-model="editForm1.thisYearBeijingPostgraduateCount" />
                </el-form-item>
              </td>
              <td style="vertical-align: middle;">小计：{{editForm1.thisYearBeijingBachelorCount+editForm1.thisYearBeijingPostgraduateCount}}人</td>
              <td rowspan="2" style="vertical-align: middle;">京内生源比例：
                {{(editForm1.thisYearBeijingBachelorCount+editForm1.thisYearBeijingPostgraduateCount+editForm1.thisYearBachelorCount+editForm1.thisYearPostgraduateCount)?(100*(editForm1.thisYearBeijingBachelorCount+editForm1.thisYearBeijingPostgraduateCount)/(editForm1.thisYearBeijingBachelorCount+editForm1.thisYearBeijingPostgraduateCount+editForm1.thisYearBachelorCount+editForm1.thisYearPostgraduateCount)).toFixed(1):'0'}}%</td>
            </tr>
            <tr>
              <th style="vertical-align: middle;">京外生源</th>
              <th style="vertical-align: middle;">本科生</th>
              <td style="vertical-align: middle;">
                <el-form-item prop="thisYearBachelorCount">
                  <el-input-number v-model="editForm1.thisYearBachelorCount" />
                </el-form-item>
              </td>
              <th style="width:120px; vertical-align: middle;">研究生</th>
              <td style="vertical-align: middle;">
                <el-form-item prop="thisYearPostgraduateCount">
                  <el-input-number v-model="editForm1.thisYearPostgraduateCount" />
                </el-form-item>
              </td>
              <td style="vertical-align: middle;">小计：{{editForm1.thisYearBachelorCount+editForm1.thisYearPostgraduateCount}}人</td>
            </tr>
          </template>
          <template v-else-if='theType1===2&&unitBeijing1===2'>
            <tr>
              <th style="width:120px; vertical-align: middle;">本年度拟申报的应届毕业生招聘计划数</th>
              <th style="vertical-align: middle;">本科生</th>
              <td style="vertical-align: middle;" colspan="2">
                <el-form-item prop="thisYearBachelorCount">
                  <el-input-number v-model="editForm1.thisYearBachelorCount" />
                </el-form-item>
              </td>
              <th style="width:120px; vertical-align: middle;">研究生</th>
              <td style="vertical-align: middle;" colspan="2">
                <el-form-item prop="thisYearPostgraduateCount">
                  <el-input-number v-model="editForm1.thisYearPostgraduateCount" />
                </el-form-item>
              </td>
              <td style="vertical-align: middle;">小计：{{editForm1.thisYearBachelorCount+editForm1.thisYearPostgraduateCount}}人</td>
            </tr>
          </template>
          <tr v-if='theType1===2'>
            <th>本年度在职招聘计划需求数</th>
            <td colspan="7">
                <el-form-item prop="thisYearInServicePersonCount">
                  <el-input-number v-model="editForm1.thisYearInServicePersonCount" />
                </el-form-item>
            </td>
          </tr>
          <tr>
            <th>备注</th>
            <td colspan="7">
              <el-input type="textarea" v-model="editForm1.remark" style="width:100%"></el-input>
            </td>
          </tr>
        </table>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click.native="editFormSubmit1" :loading="editLoading">提交</el-button>
        <el-button @click.native="editFormVisible1 = false">取消</el-button>
      </div>
    </el-dialog>
    <el-dialog :title="dialogTitle" :visible.sync="editFormVisible2" width="98%" top="20px" :close-on-click-modal="false" :close-on-press-escape="false">
      <el-form :model="editForm2" label-width="200px" ref="editForm2" :inline="true" style="padding:10px 0 0;clear:both" inline-message :rules="editFormRules2">
        <table cellspacing="0" cellpadding="0" class="mytable">
          <tr>
            <th style="width:120px; vertical-align: middle;">单位名称</th>
            <td style="vertical-align: middle;" colspan="4">
              <el-form-item prop="unitName">
                <el-input v-model="editForm2.unitName" style="width:500px"></el-input>
              </el-form-item>
            </td>
            <!-- <th style="width:120px; vertical-align: middle;">开始年度</th>
            <td style="vertical-align: middle;">
              <el-form-item prop="title">
                <el-date-picker
                  v-model="startYear"
                  type="year"
                  placeholder="选择年">
                </el-date-picker>
              </el-form-item>
            </td> -->
          </tr>
          <tr>
            <th colspan="2" style="width:120px; vertical-align: middle;"></th>
            <th style="width:120px; vertical-align: middle; text-align:center">{{startYear}}年</th>
            <th style="width:120px; vertical-align: middle; text-align:center">{{parseInt(startYear)+1}}年</th>
            <th style="width:120px; vertical-align: middle; text-align:center">{{parseInt(startYear)+2}}年</th>
          </tr>
          <tr>
            <th style="width:120px; vertical-align: middle;" rowspan="3">毕业生留存情况</th>
            <th style="width:120px; vertical-align: middle;">实际接收落户人数</th>
            <td style="vertical-align: middle;">
              <el-form-item prop="settleCount1">
                <el-input-number v-model="editForm2.settleCount1" />
              </el-form-item>
            </td>
            <td style="vertical-align: middle;">
              <el-form-item prop="settleCount2">
                <el-input-number v-model="editForm2.settleCount2" />
              </el-form-item>
            </td>
            <td style="vertical-align: middle;">
              <el-form-item prop="settleCount3">
                <el-input-number v-model="editForm2.settleCount3" />
              </el-form-item>
            </td>
          </tr>
          <tr>
            <th style="width:120px; vertical-align: middle;">截至目前在岗人数</th>
            <td style="vertical-align: middle;">
              <el-form-item prop="inPostCount1">
                <el-input-number v-model="editForm2.inPostCount1" />
              </el-form-item>
            </td>
            <td style="vertical-align: middle;">
              <el-form-item prop="inPostCount2">
                <el-input-number v-model="editForm2.inPostCount2" />
              </el-form-item>
            </td>
            <td style="vertical-align: middle;">
              <el-form-item prop="inPostCount3">
                <el-input-number v-model="editForm2.inPostCount3" />
              </el-form-item>
            </td>
          </tr>
          <tr>
            <th style="width:120px; vertical-align: middle;">留存率</th>
            <td style="vertical-align: middle;">{{editForm2.settleCount1?(100*editForm2.inPostCount1/editForm2.settleCount1).toFixed(1):0}}%</td>
            <td style="vertical-align: middle;">{{editForm2.settleCount2?(100*editForm2.inPostCount2/editForm2.settleCount2).toFixed(1):0}}%</td>
            <td style="vertical-align: middle;">{{editForm2.settleCount3?(100*editForm2.inPostCount3/editForm2.settleCount3).toFixed(1):0}}%</td>
          </tr>
          <tr>
            <th colspan="2" style="width:120px; vertical-align: middle;">制度建设情况（截至目前情况，请勾选）</th>
            <td colspan="3" style="vertical-align: middle;">
              <el-form-item prop="institutional">
                <el-checkbox-group v-model="editForm2.institutional">
                  <el-checkbox label="A">未制定毕业生招聘接收工作标准和规范</el-checkbox>
                  <br>
                  <el-checkbox label="B">已建立本单位毕业生招聘接收工作标准和规范</el-checkbox>
                  <br>
                  <el-checkbox label="C">执行上级主管部门统一招聘接收工作标准和规范</el-checkbox>
                </el-checkbox-group>
              </el-form-item>
            </td>
          </tr>
          <tr>
            <th colspan="2" style="width:120px; vertical-align: middle;">毕业生招聘接收方式（截至目前情况，请勾选）</th>
            <td colspan="3" style="vertical-align: middle;">
              <el-form-item prop="receiveMode">
                <el-checkbox-group v-model="editForm2.receiveMode">
                  <el-checkbox label="A">面向社会公开招聘</el-checkbox>
                  <br>
                  <el-checkbox label="B">校园招聘</el-checkbox>
                  <br>
                  <el-checkbox label="C">内部推荐</el-checkbox>
                  <br>
                  <el-checkbox label="D">其他（请注明）</el-checkbox>
                  <br>
                </el-checkbox-group>
              </el-form-item>
              <div style="width:100%" />
              <el-form-item prop="receiveModeRemark">
                <el-input v-if="editForm2.receiveMode.includes('D')" style="width:500px" v-model="editForm2.receiveModeRemark"></el-input>
              </el-form-item>
            </td>
          </tr>
        </table>
        备注：1. 本表填写近三年应届毕业生招聘情况。<br>2. “毕业生留存情况”一栏的统计口径以办理接收落户的京外生源毕业生为范围；<br>3. 在岗情况应在逐一核对接收毕业生工资、社保等劳动关系手续基础上准确填报。
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click.native="editFormSubmit2" :loading="editLoading">提交</el-button>
        <el-button @click.native="editFormVisible2 = false">取消</el-button>
      </div>
    </el-dialog>
    <el-dialog :title="dialogTitle" :visible.sync="editFormVisible3" width="98%" top="20px" :close-on-click-modal="false" :close-on-press-escape="false">
      <el-form :model="editForm3" label-width="200px" ref="editForm3" :inline="true" style="padding:10px 0 0;clear:both" inline-message :rules="editFormRules3">
        <table cellspacing="0" cellpadding="0" class="mytable">
          <tr>
            <th style="width:120px; vertical-align: middle;">单位名称</th>
            <td style="vertical-align: middle;" colspan="4">
              <el-form-item prop="unitName">
                <el-input v-model="editForm3.unitName" style="width:500px"></el-input>
              </el-form-item>
            </td>
          </tr>
          <tr>
            <th colspan="2" style="width:120px; vertical-align: middle;"></th>
            <th style="width:120px; vertical-align: middle; text-align:center">{{startYear}}年</th>
            <th style="width:120px; vertical-align: middle; text-align:center">{{parseInt(startYear)+1}}年</th>
            <th style="width:120px; vertical-align: middle; text-align:center">{{parseInt(startYear)+2}}年</th>
          </tr>
          <tr>
            <th style="width:120px; vertical-align: middle;" rowspan="4">实际接收人数</th>
            <th style="width:120px; vertical-align: middle;">本科</th>
            <td style="vertical-align: middle;">
              <el-form-item prop="settleUndergraduateCount1">
                <el-input-number v-model="editForm3.settleUndergraduateCount1" />
              </el-form-item>
            </td>
            <td style="vertical-align: middle;">
              <el-form-item prop="settleUndergraduateCount2">
                <el-input-number v-model="editForm3.settleUndergraduateCount2" />
              </el-form-item>
            </td>
            <td style="vertical-align: middle;">
              <el-form-item prop="settleUndergraduateCount3">
                <el-input-number v-model="editForm3.settleUndergraduateCount3" />
              </el-form-item>
            </td>
          </tr>
          <tr>
            <th style="width:120px; vertical-align: middle;">硕士</th>
            <td style="vertical-align: middle;">
              <el-form-item prop="settleMasterCount1">
                <el-input-number v-model="editForm3.settleMasterCount1" />
              </el-form-item>
            </td>
            <td style="vertical-align: middle;">
              <el-form-item prop="settleMasterCount2">
                <el-input-number v-model="editForm3.settleMasterCount2" />
              </el-form-item>
            </td>
            <td style="vertical-align: middle;">
              <el-form-item prop="settleMasterCount3">
                <el-input-number v-model="editForm3.settleMasterCount3" />
              </el-form-item>
            </td>
          </tr>
          <tr>
            <th style="width:120px; vertical-align: middle;">博士</th>
            <td style="vertical-align: middle;">
              <el-form-item prop="settleDoctorCount1">
                <el-input-number v-model="editForm3.settleDoctorCount1" />
              </el-form-item>
            </td>
            <td style="vertical-align: middle;">
              <el-form-item prop="settleDoctorCount2">
                <el-input-number v-model="editForm3.settleDoctorCount2" />
              </el-form-item>
            </td>
            <td style="vertical-align: middle;">
              <el-form-item prop="settleDoctorCount3">
                <el-input-number v-model="editForm3.settleDoctorCount3" />
              </el-form-item>
            </td>
          </tr>
          <tr>
            <th style="width:120px; vertical-align: middle;">合计</th>
            <td style="vertical-align: middle;">{{editForm3.settleUndergraduateCount1+editForm3.settleMasterCount1+editForm3.settleDoctorCount1}}</td>
            <td style="vertical-align: middle;">{{editForm3.settleUndergraduateCount2+editForm3.settleMasterCount2+editForm3.settleDoctorCount2}}</td>
            <td style="vertical-align: middle;">{{editForm3.settleUndergraduateCount3+editForm3.settleMasterCount3+editForm3.settleDoctorCount3}}</td>
          </tr>
          <tr>
            <th style="width:120px; vertical-align: middle;" rowspan="4">目前在岗人数</th>
            <th style="width:120px; vertical-align: middle;">本科</th>
            <td style="vertical-align: middle;">
              <el-form-item prop="inPostUndergraduateCount1">
                <el-input-number v-model="editForm3.inPostUndergraduateCount1" />
              </el-form-item>
            </td>
            <td style="vertical-align: middle;">
              <el-form-item prop="inPostUndergraduateCount2">
                <el-input-number v-model="editForm3.inPostUndergraduateCount2" />
              </el-form-item>
            </td>
            <td style="vertical-align: middle;">
              <el-form-item prop="inPostUndergraduateCount3">
                <el-input-number v-model="editForm3.inPostUndergraduateCount3" />
              </el-form-item>
            </td>
          </tr>
          <tr>
            <th style="width:120px; vertical-align: middle;">硕士</th>
            <td style="vertical-align: middle;">
              <el-form-item prop="inPostMasterCount1">
                <el-input-number v-model="editForm3.inPostMasterCount1" />
              </el-form-item>
            </td>
            <td style="vertical-align: middle;">
              <el-form-item prop="inPostMasterCount2">
                <el-input-number v-model="editForm3.inPostMasterCount2" />
              </el-form-item>
            </td>
            <td style="vertical-align: middle;">
              <el-form-item prop="inPostMasterCount3">
                <el-input-number v-model="editForm3.inPostMasterCount3" />
              </el-form-item>
            </td>
          </tr>
          <tr>
            <th style="width:120px; vertical-align: middle;">博士</th>
            <td style="vertical-align: middle;">
              <el-form-item prop="inPostDoctorCount1">
                <el-input-number v-model="editForm3.inPostDoctorCount1" />
              </el-form-item>
            </td>
            <td style="vertical-align: middle;">
              <el-form-item prop="inPostDoctorCount2">
                <el-input-number v-model="editForm3.inPostDoctorCount2" />
              </el-form-item>
            </td>
            <td style="vertical-align: middle;">
              <el-form-item prop="inPostDoctorCount3">
                <el-input-number v-model="editForm3.inPostDoctorCount3" />
              </el-form-item>
            </td>
          </tr>
          <tr>
            <th style="width:120px; vertical-align: middle;">合计</th>
            <td style="vertical-align: middle;">{{editForm3.inPostUndergraduateCount1+editForm3.inPostMasterCount1+editForm3.inPostDoctorCount1}}</td>
            <td style="vertical-align: middle;">{{editForm3.inPostUndergraduateCount2+editForm3.inPostMasterCount2+editForm3.inPostDoctorCount2}}</td>
            <td style="vertical-align: middle;">{{editForm3.inPostUndergraduateCount3+editForm3.inPostMasterCount3+editForm3.inPostDoctorCount3}}</td>
          </tr>
          <tr>
            <th style="width:120px; vertical-align: middle;" colspan="2">留存率</th>
            <td style="vertical-align: middle;">{{(editForm3.settleUndergraduateCount1+editForm3.settleMasterCount1+editForm3.settleDoctorCount1)?((editForm3.inPostUndergraduateCount1+editForm3.inPostMasterCount1+editForm3.inPostDoctorCount1)*100/(editForm3.settleUndergraduateCount1+editForm3.settleMasterCount1+editForm3.settleDoctorCount1)).toFixed(1):0}}%</td>
            <td style="vertical-align: middle;">{{(editForm3.settleUndergraduateCount2+editForm3.settleMasterCount2+editForm3.settleDoctorCount2)?((editForm3.inPostUndergraduateCount2+editForm3.inPostMasterCount2+editForm3.inPostDoctorCount2)*100/(editForm3.settleUndergraduateCount2+editForm3.settleMasterCount2+editForm3.settleDoctorCount2)).toFixed(1):0}}%</td>
            <td style="vertical-align: middle;">{{(editForm3.settleUndergraduateCount3+editForm3.settleMasterCount3+editForm3.settleDoctorCount3)?((editForm3.inPostUndergraduateCount3+editForm3.inPostMasterCount3+editForm3.inPostDoctorCount3)*100/(editForm3.settleUndergraduateCount3+editForm3.settleMasterCount3+editForm3.settleDoctorCount3)).toFixed(1):0}}%</td>
          </tr>
        </table>
        备注：1. 本表填写近三年应届毕业生招聘及留存情况。<br>2. 本表填写接收的所有毕业生情况，含京内生源和京外生源；<br>3. 留存率＝目前在岗人数合计／实际接收人数合计，保留到小数点后１位。
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click.native="editFormSubmit3" :loading="editLoading">提交</el-button>
        <el-button @click.native="editFormVisible3 = false">取消</el-button>
      </div>
    </el-dialog>
    <el-dialog :title="dialogTitle" :visible.sync="editFormVisible4" width="98%" top="20px" :close-on-click-modal="false" :close-on-press-escape="false">
      <el-form :model="editForm4" label-width="200px" ref="editForm4" :inline="true" style="padding:10px 0 0;clear:both" inline-message :rules="editFormRules4">
        <table cellspacing="0" cellpadding="0" class="mytable">
          <tr>
            <th style="width:120px; vertical-align: middle;">单位名称</th>
            <td style="vertical-align: middle;" colspan="5">
              <el-form-item prop="unitName">
                <el-input v-model="editForm4.unitName" style="width:500px"></el-input>
              </el-form-item>
            </td>
          </tr>
          <tr>
            <th style="width:120px; vertical-align: middle;">接收年份</th>
            <td style="vertical-align: middle;">
              <el-form-item prop="theYear">
                <el-select v-model="editForm4.theYear">
                  <el-option v-for="(item,index) in yearList2" :key="'year'+index" :value="item" :label="item" />
                </el-select>
              </el-form-item>
            </td>
            <th style="width:120px; vertical-align: middle;">部门名称</th>
            <td style="vertical-align: middle;">
              <el-form-item prop="department">
                <el-input v-model="editForm4.department" style="width:200px"></el-input>
              </el-form-item>
            </td>
            <th style="width:120px; vertical-align: middle;">工作岗位<br>（职位）</th>
            <td style="vertical-align: middle;">
              <el-form-item prop="post">
                <el-input v-model="editForm4.post" style="width:200px"></el-input>
              </el-form-item>
            </td>
          </tr>
          <tr>
            <th style="width:120px; vertical-align: middle;">姓名</th>
            <td style="vertical-align: middle;">
              <el-form-item prop="realName">
                <el-input v-model="editForm4.realName" style="width:100px"></el-input>
              </el-form-item>
            </td>
            <th style="width:120px; vertical-align: middle;">身份证号</th>
            <td style="vertical-align: middle;" :colspan="unitBeijing4===1?1:3">
              <el-form-item prop="idCardNo">
                <el-input v-model="editForm4.idCardNo" style="width:200px"></el-input>
              </el-form-item>
            </td>
            <th style="width:120px; vertical-align: middle;" v-if="unitBeijing4===1">生源类型</th>
            <td style="vertical-align: middle;" v-if="unitBeijing4===1">
              <el-form-item prop="inBeijing">
                <el-radio-group v-model="editForm4.inBeijing">
                  <el-radio :label="1">京内生源</el-radio>
                  <el-radio :label="2">京外生源</el-radio>
                </el-radio-group>
              </el-form-item>
            </td>
          </tr>
          <tr>
            <th style="width:120px; vertical-align: middle;">院校</th>
            <td style="vertical-align: middle;">
              <el-form-item prop="school">
                <el-input v-model="editForm4.school" style="width:200px"></el-input>
              </el-form-item>
            </td>
            <th style="width:120px; vertical-align: middle;">所学专业</th>
            <td style="vertical-align: middle;">
              <el-form-item prop="major">
                <el-input v-model="editForm4.major" style="width:200px"></el-input>
              </el-form-item>
            </td>
            <th style="width:120px; vertical-align: middle;">是否在岗</th>
            <td style="vertical-align: middle;">
              <el-form-item prop="inPost">
                <el-radio-group v-model="editForm4.inPost">
                  <el-radio :label="1">是</el-radio>
                  <el-radio :label="0">否</el-radio>
                </el-radio-group>
              </el-form-item>
            </td>
          </tr>
          <tr>
            <th style="width:120px; vertical-align: middle;">备注</th>
            <td style="vertical-align: middle;" colspan="5">
              <el-form-item prop="remark">
                <el-input v-model="editForm4.remark" style="width:800px"></el-input>
              </el-form-item>
            </td>
          </tr>
        </table>
       </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click.native="editFormSubmit4" :loading="editLoading">提交</el-button>
        <el-button @click.native="editFormVisible4 = false">取消</el-button>
      </div>
    </el-dialog>
    <el-dialog :title="dialogTitle" :visible.sync="editFormVisible5" width="98%" top="20px" :close-on-click-modal="false" :close-on-press-escape="false">
      <el-form :model="editForm5" label-width="200px" ref="editForm5" :inline="true" style="padding:10px 0 0;clear:both" inline-message :rules="editFormRules5">
        <table cellspacing="0" cellpadding="0" class="mytable">
          <tr>
            <th style="width:120px; vertical-align: middle;">单位名称</th>
            <td style="vertical-align: middle;" :colspan="unitBeijing5===1?2:1">
              <el-form-item prop="unitName">
                <el-input v-model="editForm5.unitName" style="width:500px"></el-input>
              </el-form-item>
            </td>
            <th style="width:120px; vertical-align: middle;">具体工作部门</th>
            <td style="vertical-align: middle;" :colspan="unitBeijing5===1?3:1">
              <el-form-item prop="department">
                <el-input v-model="editForm5.department" style="width:200px"></el-input>
              </el-form-item>
            </td>
          </tr>
          <tr>
            <th style="width:120px; vertical-align: middle;">岗位</th>
            <td style="vertical-align: middle;" :colspan="unitBeijing5===1?2:1">
              <el-form-item prop="post">
                <el-input v-model="editForm5.post" style="width:200px"></el-input>
              </el-form-item>
            </td>
            <th style="width:120px; vertical-align: middle;">专业</th>
            <td style="vertical-align: middle;" :colspan="unitBeijing5===1?3:1">
              <el-form-item prop="major">
                <el-input v-model="editForm5.major" style="width:200px"></el-input>
              </el-form-item>
            </td>
          </tr>
          <template v-if="unitBeijing5===1">
            <tr>
              <th style="width:120px; vertical-align: middle;"></th>
              <th style="width:120px; vertical-align: middle; text-align:left">大专</th>
              <th style="width:120px; vertical-align: middle; text-align:left">本科生</th>
              <th style="width:120px; vertical-align: middle; text-align:left">硕士研究生</th>
              <th style="width:120px; vertical-align: middle; text-align:left">博士研究生</th>
              <th style="width:120px; vertical-align: middle; text-align:left">其他</th>
              <th style="width:120px; vertical-align: middle; text-align:left">合计</th>
            </tr>
            <tr>
              <th style="width:120px; vertical-align: middle;">京内生源</th>
              <td style="vertical-align: middle;" colspan="1">
                <el-form-item prop="countBeijing1">
                  <el-input-number v-model="editForm5.countBeijing1" />
                </el-form-item>
              </td>
              <td style="vertical-align: middle;" colspan="1">
                <el-form-item prop="countBeijing2">
                  <el-input-number v-model="editForm5.countBeijing2" />
                </el-form-item>
              </td>
              <td style="vertical-align: middle;" colspan="1">
                <el-form-item prop="countBeijing3">
                  <el-input-number v-model="editForm5.countBeijing3" />
                </el-form-item>
              </td>
              <td style="vertical-align: middle;" colspan="1">
                <el-form-item prop="countBeijing4">
                  <el-input-number v-model="editForm5.countBeijing4" />
                </el-form-item>
              </td>
              <td style="vertical-align: middle;" colspan="1">
                <el-form-item prop="countBeijing5">
                  <el-input-number v-model="editForm5.countBeijing5" />
                </el-form-item>
              </td>
              <td style="vertical-align: middle;" colspan="1">{{editForm5.countBeijing1+editForm5.countBeijing2+editForm5.countBeijing3+editForm5.countBeijing4+editForm5.countBeijing5}}</td>
            </tr>
            <tr>
              <th style="width:120px; vertical-align: middle;">京外生源</th>
              <td style="vertical-align: middle;" colspan="1">
                <el-form-item prop="count1">
                  <el-input-number v-model="editForm5.count1" />
                </el-form-item>
              </td>
              <td style="vertical-align: middle;" colspan="1">
                <el-form-item prop="count2">
                  <el-input-number v-model="editForm5.count2" />
                </el-form-item>
              </td>
              <td style="vertical-align: middle;" colspan="1">
                <el-form-item prop="count3">
                  <el-input-number v-model="editForm5.count3" />
                </el-form-item>
              </td>
              <td style="vertical-align: middle;" colspan="1">
                <el-form-item prop="count4">
                  <el-input-number v-model="editForm5.count4" />
                </el-form-item>
              </td>
              <td style="vertical-align: middle;" colspan="1">
                <el-form-item prop="count5">
                  <el-input-number v-model="editForm5.count5" />
                </el-form-item>
              </td>
              <td style="vertical-align: middle;" colspan="1">{{editForm5.count1+editForm5.count2+editForm5.count3+editForm5.count4+editForm5.count5}}</td>
            </tr>
          </template>
          <template v-else>
            <tr>
              <th style="width:120px; vertical-align: middle;">大专</th>
              <td style="vertical-align: middle;" colspan="1">
                <el-form-item prop="count1">
                  <el-input-number v-model="editForm5.count1" />
                </el-form-item>
              </td>
              <th style="width:120px; vertical-align: middle;">本科生</th>
              <td style="vertical-align: middle;" colspan="1">
                <el-form-item prop="count2">
                  <el-input-number v-model="editForm5.count2" />
                </el-form-item>
              </td>
            </tr>
            <tr>
              <th style="width:120px; vertical-align: middle;">硕士生</th>
              <td style="vertical-align: middle;" colspan="1">
                <el-form-item prop="count3">
                  <el-input-number v-model="editForm5.count3" />
                </el-form-item>
              </td>
              <th style="width:120px; vertical-align: middle;">博士生</th>
              <td style="vertical-align: middle;" colspan="1">
                <el-form-item prop="count4">
                  <el-input-number v-model="editForm5.count4" />
                </el-form-item>
              </td>
            </tr>
            <tr>
              <th style="width:120px; vertical-align: middle;">其他</th>
              <td style="vertical-align: middle;" colspan="1">
                <el-form-item prop="count5">
                  <el-input-number v-model="editForm5.count5" />
                </el-form-item>
              </td>
              <th style="width:120px; vertical-align: middle;">合计</th>
              <td style="vertical-align: middle;" colspan="1">{{editForm5.count1+editForm5.count2+editForm5.count3+editForm5.count4+editForm5.count5}}</td>
            </tr>
          </template>
        </table>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click.native="editFormSubmit5" :loading="editLoading">提交</el-button>
        <el-button @click.native="editFormVisible5 = false">取消</el-button>
      </div>
    </el-dialog>
    <el-dialog :title="dialogTitle" :visible.sync="editFormVisible6" width="98%" top="20px" :close-on-click-modal="false" :close-on-press-escape="false">
      <el-form :model="editForm6" label-width="200px" ref="editForm6" :inline="true" style="padding:10px 0 0;clear:both" inline-message :rules="editFormRules6">
        <table cellspacing="0" cellpadding="0" class="mytable">
          <tr v-if="unitBeijing!==3">
            <th style="width:120px; vertical-align: middle;">单位名称</th>
            <td style="vertical-align: middle;" :colspan="3">
              <el-form-item prop="unitName">
                <el-input v-model="editForm6.unitName" style="width:500px"></el-input>
              </el-form-item>
            </td>
          </tr>
          <tr v-else>
            <th style="width:120px; vertical-align: middle;">单位名称</th>
            <td style="vertical-align: middle;">
              <el-form-item prop="unitName">
                <el-input v-model="editForm6.unitName" style="width:500px"></el-input>
              </el-form-item>
            </td>
            <th style="width:120px; vertical-align: middle;">京内京外</th>
            <td style="vertical-align: middle;">
              <el-form-item prop="unitBeijing">
                <el-radio-group v-model="editForm6.unitBeijing">
                  <el-radio :label="1">在京单位</el-radio>
                  <el-radio :label="2">京外单位</el-radio>
                </el-radio-group>
              </el-form-item>
            </td>
          </tr>
          <tr>
            <th style="width:120px; vertical-align: middle;">具体工作部门</th>
            <td style="vertical-align: middle;">
              <el-form-item prop="department">
                <el-input v-model="editForm6.department" style="width:200px"></el-input>
              </el-form-item>
            </td>
            <th style="width:120px; vertical-align: middle;">岗位</th>
            <td style="vertical-align: middle;">
              <el-form-item prop="post">
                <el-input v-model="editForm6.post" style="width:200px"></el-input>
              </el-form-item>
            </td>
          </tr>
          <tr>
            <th style="width:120px; vertical-align: middle;">招聘人数</th>
            <td style="vertical-align: middle;">
              <el-form-item prop="personCount">
                <el-input-number v-model="editForm6.personCount" />
              </el-form-item>
            </td>
            <th style="width:120px; vertical-align: middle;">户籍要求</th>
            <td style="vertical-align: middle;">
              <el-form-item prop="residenceRequirements">
                <el-input v-model="editForm6.residenceRequirements" style="width:200px"></el-input>
              </el-form-item>
            </td>
          </tr>
          <tr>
            <th style="width:120px; vertical-align: middle;">学历学位</th>
            <td style="vertical-align: middle;">
              <el-form-item prop="education">
                <el-input v-model="editForm6.education" style="width:200px"></el-input>
              </el-form-item>
            </td>
            <th style="width:120px; vertical-align: middle;">专业</th>
            <td style="vertical-align: middle;">
              <el-form-item prop="major">
                <el-input v-model="editForm6.major" style="width:200px"></el-input>
              </el-form-item>
            </td>
          </tr>
          <tr>
            <th style="width:120px; vertical-align: middle;">其他条件</th>
            <td style="vertical-align: middle;" :colspan="3">
              <el-form-item prop="others">
                <el-input v-model="editForm6.others" style="width:500px"></el-input>
              </el-form-item>
            </td>
          </tr>
          <tr>
            <th style="width:120px; vertical-align: middle;">备注</th>
            <td style="vertical-align: middle;" :colspan="3">
              <el-form-item prop="remark">
                <el-input v-model="editForm6.remark" style="width:500px"></el-input>
              </el-form-item>
            </td>
          </tr>
        </table>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click.native="editFormSubmit6" :loading="editLoading">提交</el-button>
        <el-button @click.native="editFormVisible6 = false">取消</el-button>
      </div>
    </el-dialog>

    <div v-if="canEdit">
      <el-upload
        style="width:800px;margin-bottom:10px;"
        ref="upload1"
        :action="this.$http.defaults.baseURL+this.$http.defaults.recruitAPI +'api/recruitGenFileInfo/upload'"
        :on-success="handleUploadSucc1"
        :on-error="uploadError"
        :before-upload="beforeUpload"
        accept="application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.ms-works,.wps"
        :show-file-list="false"
      >
        <el-button type="primary" :loading="saveloading">上传PDF</el-button>
        <!-- <div slot="tip" class="el-upload__tip">注：支持上传word/pdf/wps文件</div>
        <div style="clear:both" /> -->
      </el-upload>
    </div>
    <div v-if="!fileListLoading">
      <template v-if="files1&&files1.length>0">
        <div v-for="(item,index) in files1" :key="index" style="line-height:40px">
          <a href="javascript:void(0)" @click="download(item.id)"><i class="el-icon-paperclip" /> {{item.fileName}}.{{item.fileType}}</a>
          <el-button v-if="canEdit" style="margin-left:10px" size="mini" type="danger" @click="beforeRemove(item,'bus_plan_declare_table1','files1')">删除</el-button>
          <!-- <template v-if="item.fileType==='pdf'"><i style="cursor: pointer;" class="el-icon-search" @click="showfile(item.id)" /></template> -->
        </div>
      </template>
    </div>
    <div v-else>加载中...</div>
    <el-tabs v-model="activeName" @tab-click="tabClick">
      <el-tab-pane name="6">
        <span slot="label">表1：岗位需求信息表</span>
        <template v-if="unitBeijing!==2">
          <el-button v-if="canEdit" icon="el-icon-plus" type="success" style="float:right;margin-left:10px" @click="handleAdd5(null,1)">新增</el-button>
          <el-button icon="el-icon-download" type="primary" style="float:right" @click="export5(1)">导出</el-button>
          <h1 style="text-align:center">{{theYear}}年度招聘应届毕业生岗位需求信息表（在京单位）</h1>
          <el-table :data="list5_1" highlight-current-row v-loading="listLoading" style="width: 100%;margin-bottom: 20px;" show-summary>
            <el-table-column prop="unitName" label="单位名称" min-width="150">
            </el-table-column>
            <el-table-column label="具体工作部门" width="250">
              <template slot-scope="scope">
                {{scope.row.department}}
              </template>
            </el-table-column>
            <el-table-column label="岗位" width="150" align="center">
              <template slot-scope="scope">
                {{scope.row.post}}
              </template>
            </el-table-column>
            <el-table-column label="专业" width="250" align="center">
              <template slot-scope="scope">
                {{scope.row.major}}
              </template>
            </el-table-column>
            <el-table-column label="京内生源" width="80" align="center">
              <el-table-column prop="countBeijing1" width="70" label="大专" align="center" />
              <el-table-column prop="countBeijing2" width="70" label="本科生" align="center" />
              <el-table-column prop="countBeijing3" width="70" label="硕士研究生" align="center" />
              <el-table-column prop="countBeijing4" width="70" label="博士研究生" align="center" />
              <el-table-column prop="countBeijing5" width="70" label="其他" align="center" />
              <el-table-column prop="sum5_1" width="60" label="小计" align="center" />
            </el-table-column>
            <el-table-column label="京外生源" width="80" align="center">
              <el-table-column prop="count1" width="70" label="大专" align="center" />
              <el-table-column prop="count2" width="70" label="本科生" align="center" />
              <el-table-column prop="count3" width="70" label="硕士研究生" align="center" />
              <el-table-column prop="count4" width="70" label="博士研究生" align="center" />
              <el-table-column prop="count5" width="70" label="其他" align="center" />
              <el-table-column prop="sum5_2" width="60" label="小计" align="center" />
            </el-table-column>
            <el-table-column label="操作" width="120" v-if="canEdit" key="edit8">
              <template slot-scope="scope">
                <template>
                  <el-dropdown split-button  @click="handleDetail5(scope.row,null,1)" size="small" type="primary" :loading="btnLoading">
                    修改
                    <el-dropdown-menu slot="dropdown">
                      <el-dropdown-item @click.native="handleDel5(scope.row.id)" >删除</el-dropdown-item>
                    </el-dropdown-menu>
                  </el-dropdown>
                </template>
              </template>
            </el-table-column>
          </el-table>
        </template>
        <!-- <el-button v-if="canEdit" icon="el-icon-upload2" type="success" style="float:right">批量导入</el-button>
        <el-button v-if="canEdit" icon="el-icon-download" type="primary" style="float:right;margin-right:10px">下载模板</el-button> -->
        <template v-if="unitBeijing!==1">
          <el-button v-if="canEdit" icon="el-icon-plus" type="success" style="float:right;margin-left:10px" @click="handleAdd5(null,2)">新增</el-button>
          <el-button icon="el-icon-download" type="primary" style="float:right" @click="export5(2)">导出</el-button>
          <h1 style="text-align:center">{{theYear}}年度招聘应届毕业生岗位需求信息表（京外单位）</h1>
          <el-table :data="list5_2" highlight-current-row v-loading="listLoading" style="width: 100%;margin-bottom: 20px;" show-summary>
            <el-table-column prop="unitName" label="单位名称" min-width="150">
            </el-table-column>
            <el-table-column label="具体工作部门" width="250">
              <template slot-scope="scope">
                {{scope.row.department}}
              </template>
            </el-table-column>
            <el-table-column label="岗位" width="150" align="center">
              <template slot-scope="scope">
                {{scope.row.post}}
              </template>
            </el-table-column>
            <el-table-column label="专业" width="250" align="center">
              <template slot-scope="scope">
                {{scope.row.major}}
              </template>
            </el-table-column>
            <el-table-column prop="sy" label="学历要求" width="80" align="center">
              <el-table-column prop="count1" width="70" label="大专" align="center" />
              <el-table-column prop="count2" width="70" label="本科生" align="center" />
              <el-table-column prop="count3" width="70" label="硕士研究生" align="center" />
              <el-table-column prop="count4" width="70" label="博士研究生" align="center" />
              <el-table-column prop="count5" width="70" label="其他" align="center" />
              <el-table-column prop="sum5_2" width="60" label="小计" align="center" />
            </el-table-column>
            <el-table-column label="操作" width="120" v-if="canEdit" key="edit9">
              <template slot-scope="scope">
                <template>
                  <el-dropdown split-button  @click="handleDetail5(scope.row,null,2)" size="small" type="primary" :loading="btnLoading">
                    修改
                    <el-dropdown-menu slot="dropdown">
                      <el-dropdown-item @click.native="handleDel5(scope.row.id)" >删除</el-dropdown-item>
                    </el-dropdown-menu>
                  </el-dropdown>
                </template>
              </template>
            </el-table-column>
          </el-table>
        </template>
        <el-button v-if="canEdit" icon="el-icon-plus" type="success" style="float:right;margin-left:10px" @click="handleAdd6(null,null)">新增</el-button>
        <el-button icon="el-icon-download" type="primary" style="float:right" @click="export6()">导出</el-button>
        <h1 style="text-align:center">{{theYear}}年度招聘在职人员岗位需求信息表</h1>
        <el-table :data="list6" highlight-current-row v-loading="listLoading" style="width: 100%;">
          <el-table-column type="index" label="序号" width="60" align="center">
          </el-table-column>
          <el-table-column prop="unitName" label="单位名称" min-width="150">
          </el-table-column>
          <el-table-column prop="department" label="具体工作部门" width="250">
          </el-table-column>
          <el-table-column prop="post" label="岗位" width="150" align="center">
          </el-table-column>
          <el-table-column prop="personCount" label="招聘人数" width="100" align="center">
          </el-table-column>
          <el-table-column prop="residenceRequirements" label="户籍要求" width="100" align="center">
          </el-table-column>
          <el-table-column prop="education" label="学历学位" width="150" align="center">
          </el-table-column>
          <el-table-column prop="major" label="专业" width="150" align="center">
          </el-table-column>
          <el-table-column prop="others" label="其他条件" width="200" align="center">
          </el-table-column>
          <el-table-column prop="remark" label="备注" width="100">
          </el-table-column>
          <el-table-column label="操作" width="120" v-if="canEdit" key="edit10">
            <template slot-scope="scope">
              <template>
                <el-dropdown split-button  @click="handleDetail6(scope.row)" size="small" type="primary" :loading="btnLoading">
                  修改
                  <el-dropdown-menu slot="dropdown">
                    <el-dropdown-item @click.native="handleDel6(scope.row.id)" >删除</el-dropdown-item>
                  </el-dropdown-menu>
                </el-dropdown>
              </template>
            </template>
          </el-table-column>
        </el-table>
        <el-button type="primary" :loading="saveloading" style="margin-top:10px">同步表2-6数据</el-button>
      </el-tab-pane>
      <el-tab-pane name="1">
        <span slot="label">表2：应届毕业生招聘计划申报表</span>
        <template v-if="unitBeijing!==2">
          <!-- <el-button v-if="canEdit" icon="el-icon-plus" type="success" style="float:right" @click="handleAdd1(1,1)">新增</el-button> -->
          <el-button icon="el-icon-download" type="primary" style="float:right" @click="export1(1,1)">导出</el-button>
          <h1 style="text-align:center">{{theYear}}年度应届毕业生招聘计划申报表（在京单位填写）</h1>
          <el-table :data="list1_1" highlight-current-row v-loading="listLoading" style="width: 100%;margin-bottom: 20px;" show-summary>
            <el-table-column type="index" label="序号" width="40" align="center">
            </el-table-column>
            <el-table-column label="单位名称" min-width="150">
              <template slot-scope="scope">
                {{scope.row.unitName}}
              </template>
            </el-table-column>
            <el-table-column prop="authorizedPersonCount" label="编制（员工控制数）" width="70" align="center">
            </el-table-column>
            <el-table-column prop="authorizedLeaderCount" label="其中领导班子职数" width="50" align="center">
            </el-table-column>
            <el-table-column prop="actualPersonCount" label="现有人员数" width="50" align="center">
            </el-table-column>
            <el-table-column prop="actualLeaderCount" label="其中领导班子人数" width="50" align="center">
            </el-table-column>
            <el-table-column prop="retireesCount" label="拟离退休人数（截至7月底）" width="70" align="center">
            </el-table-column>
            <el-table-column :label="'上年度('+(theYear-1)+'年)年实际接收情况'" align="center">
              <el-table-column label="京内生源" align="center">
                <el-table-column prop="lastYearBeijingBachelorCount" width="50" label="大专" align="center" />
                <el-table-column prop="lastYearBeijingPostgraduateCount" width="50" label="本科生" align="center" />
                <el-table-column prop="lastYearBeijingBachelorCount" width="50" label="硕士研究生" align="center" />
                <el-table-column prop="lastYearBeijingPostgraduateCount" width="50" label="博士研究生" align="center" />
                <el-table-column prop="lastYearBeijingPostgraduateCount" width="50" label="其他" align="center" />
                <el-table-column prop="sum1" width="50" label="小计" align="center" />
              </el-table-column>
              <el-table-column label="京外生源" align="center">
                <el-table-column prop="lastYearBeijingBachelorCount" width="50" label="大专" align="center" />
                <el-table-column prop="lastYearBeijingPostgraduateCount" width="50" label="本科生" align="center" />
                <el-table-column prop="lastYearBeijingBachelorCount" width="50" label="硕士研究生" align="center" />
                <el-table-column prop="lastYearBeijingPostgraduateCount" width="50" label="博士研究生" align="center" />
                <el-table-column prop="lastYearBeijingPostgraduateCount" width="50" label="其他" align="center" />
                <el-table-column prop="sum1" width="50" label="小计" align="center" />
              </el-table-column>
              <el-table-column prop="prop1" width="70" label="京内生源比例" align="center" />
            </el-table-column>
            <el-table-column :label="'本年度('+theYear+'年)需求情况'" align="center">
              <el-table-column label="京内生源" align="center">
                <el-table-column prop="lastYearBeijingBachelorCount" width="50" label="大专" align="center" />
                <el-table-column prop="lastYearBeijingPostgraduateCount" width="50" label="本科生" align="center" />
                <el-table-column prop="lastYearBeijingBachelorCount" width="50" label="硕士研究生" align="center" />
                <el-table-column prop="lastYearBeijingPostgraduateCount" width="50" label="博士研究生" align="center" />
                <el-table-column prop="lastYearBeijingPostgraduateCount" width="50" label="其他" align="center" />
                <el-table-column prop="sum1" width="50" label="小计" align="center" />
              </el-table-column>
              <el-table-column label="京外生源" align="center">
                <el-table-column prop="lastYearBeijingBachelorCount" width="50" label="大专" align="center" />
                <el-table-column prop="lastYearBeijingPostgraduateCount" width="50" label="本科生" align="center" />
                <el-table-column prop="lastYearBeijingBachelorCount" width="50" label="硕士研究生" align="center" />
                <el-table-column prop="lastYearBeijingPostgraduateCount" width="50" label="博士研究生" align="center" />
                <el-table-column prop="lastYearBeijingPostgraduateCount" width="50" label="其他" align="center" />
                <el-table-column prop="sum1" width="50" label="小计" align="center" />
              </el-table-column>
              <el-table-column prop="prop2" width="70" label="京内生源比例" align="center" />
            </el-table-column>
            <!-- <el-table-column label="备注" width="100" show-overflow-tooltip>
              <template slot-scope="scope">
                {{scope.row.remark}}
              </template>
            </el-table-column>
            <el-table-column label="操作" width="120" v-if="canEdit" key="edit1">
              <template slot-scope="scope">
                <template>
                  <el-dropdown split-button  @click="handleDetail1(scope.row,1,1)" size="small" type="primary" :loading="btnLoading">
                    修改
                    <el-dropdown-menu slot="dropdown">
                      <el-dropdown-item @click.native="handleDel1(scope.row.id)" >删除</el-dropdown-item>
                    </el-dropdown-menu>
                  </el-dropdown>
                </template>
              </template>
            </el-table-column> -->
          </el-table>
        </template>
        <template v-if="unitBeijing!==1">
          <!-- <el-button v-if="canEdit" icon="el-icon-plus" type="success" style="float:right" @click="handleAdd1(1,2)">新增</el-button> -->
          <el-button icon="el-icon-download" type="primary" style="float:right" @click="export1(1,2)">导出</el-button>
          <h1 style="text-align:center">{{theYear}}年度应届毕业生招聘计划申报表（京外单位填写）</h1>
          <el-table :data="list1_2" highlight-current-row v-loading="listLoading" style="width: 100%;" show-summary>
            <el-table-column type="index" label="序号" width="60" align="center">
            </el-table-column>
            <el-table-column label="单位名称" min-width="150">
              <template slot-scope="scope">
                {{scope.row.unitName}}
              </template>
            </el-table-column>
            <el-table-column prop="authorizedPersonCount" label="编制（员工控制数）" width="100" align="center">
            </el-table-column>
            <el-table-column prop="authorizedLeaderCount" label="其中领导班子职数" width="90" align="center">
            </el-table-column>
            <el-table-column prop="actualPersonCount" label="现有人员数" width="100" align="center">
            </el-table-column>
            <el-table-column prop="actualLeaderCount" label="其中领导班子人数" width="90" align="center">
            </el-table-column>
            <el-table-column prop="retireesCount" label="拟离退休人数（截至7月底）" width="90" align="center">
            </el-table-column>
            <el-table-column :label="'上年度('+(theYear-1)+'年)年实际接收情况'" align="center">
              <el-table-column prop="lastYearBeijingBachelorCount" width="50" label="大专" align="center" />
              <el-table-column prop="lastYearBeijingPostgraduateCount" width="50" label="本科生" align="center" />
              <el-table-column prop="lastYearBeijingBachelorCount" width="50" label="硕士研究生" align="center" />
              <el-table-column prop="lastYearBeijingPostgraduateCount" width="50" label="博士研究生" align="center" />
              <el-table-column prop="lastYearBeijingPostgraduateCount" width="50" label="其他" align="center" />
              <el-table-column prop="sum2" width="60" label="小计" align="center" />
            </el-table-column>
            <el-table-column  :label="'本年度('+theYear+'年)需求情况'" align="center">
              <el-table-column prop="lastYearBeijingBachelorCount" width="50" label="大专" align="center" />
              <el-table-column prop="lastYearBeijingPostgraduateCount" width="50" label="本科生" align="center" />
              <el-table-column prop="lastYearBeijingBachelorCount" width="50" label="硕士研究生" align="center" />
              <el-table-column prop="lastYearBeijingPostgraduateCount" width="50" label="博士研究生" align="center" />
              <el-table-column prop="lastYearBeijingPostgraduateCount" width="50" label="其他" align="center" />
              <el-table-column prop="sum4" width="60" label="小计" align="center" />
            </el-table-column>
            <!-- <el-table-column label="备注" width="100" show-overflow-tooltip>
              <template slot-scope="scope">
                {{scope.row.remark}}
              </template>
            </el-table-column>
            <el-table-column label="操作" width="120" v-if="canEdit" key="edit2">
              <template slot-scope="scope">
                <template>
                  <el-dropdown split-button  @click="handleDetail1(scope.row,1,2)" size="small" type="primary" :loading="btnLoading">
                    修改
                    <el-dropdown-menu slot="dropdown">
                      <el-dropdown-item @click.native="handleDel1(scope.row.id)" >删除</el-dropdown-item>
                    </el-dropdown-menu>
                  </el-dropdown>
                </template>
              </template>
            </el-table-column> -->
          </el-table>
        </template>
      </el-tab-pane>
      <el-tab-pane name="2">
        <span slot="label">表3：在职人员招聘计划申报表</span>
        <template v-if="unitBeijing!==2">
          <!-- <el-button v-if="canEdit" icon="el-icon-plus" type="success" style="float:right" @click="handleAdd1(2,1)">新增</el-button> -->
          <el-button icon="el-icon-download" type="primary" style="float:right" @click="export1(2,1)">导出</el-button>
          <h1 style="text-align:center">{{theYear}}年度在职人员招聘计划申报表（在京单位填写）</h1>
          <el-table :data="list1_3" highlight-current-row v-loading="listLoading" style="width: 100%;margin-bottom: 20px;" show-summary>
            <el-table-column type="index" label="序号" width="60" align="center">
            </el-table-column>
            <el-table-column label="单位名称" min-width="150">
              <template slot-scope="scope">
                {{scope.row.unitName}}
              </template>
            </el-table-column>
            <el-table-column prop="authorizedPersonCount" label="编制（员工控制数）" width="100" align="center">
            </el-table-column>
            <el-table-column prop="authorizedLeaderCount" label="其中领导班子职数" width="90" align="center">
            </el-table-column>
            <el-table-column prop="actualPersonCount" label="现有人员数" width="100" align="center">
            </el-table-column>
            <el-table-column prop="actualLeaderCount" label="其中领导班子人数" width="90" align="center">
            </el-table-column>
            <el-table-column prop="retireesCount" label="拟离退休人数（截至7月底）" width="90" align="center">
            </el-table-column>
            <el-table-column label="本年度拟申报的应届毕业生招聘计划数" align="center">
              <el-table-column label="京内生源" align="center">
                <el-table-column prop="lastYearBeijingBachelorCount" width="50" label="大专" align="center" />
                <el-table-column prop="lastYearBeijingPostgraduateCount" width="50" label="本科生" align="center" />
                <el-table-column prop="lastYearBeijingBachelorCount" width="50" label="硕士研究生" align="center" />
                <el-table-column prop="lastYearBeijingPostgraduateCount" width="50" label="博士研究生" align="center" />
                <el-table-column prop="lastYearBeijingPostgraduateCount" width="50" label="其他" align="center" />
                <el-table-column prop="sum3" width="60" label="小计" align="center" />
              </el-table-column>
              <el-table-column label="京外生源" align="center">
                <el-table-column prop="lastYearBeijingBachelorCount" width="50" label="大专" align="center" />
                <el-table-column prop="lastYearBeijingPostgraduateCount" width="50" label="本科生" align="center" />
                <el-table-column prop="lastYearBeijingBachelorCount" width="50" label="硕士研究生" align="center" />
                <el-table-column prop="lastYearBeijingPostgraduateCount" width="50" label="博士研究生" align="center" />
                <el-table-column prop="lastYearBeijingPostgraduateCount" width="50" label="其他" align="center" />
                <el-table-column prop="sum4" width="60" label="小计" align="center" />
              </el-table-column>
              <el-table-column prop="prop2" width="70" label="京内生源比例" align="center" />
            </el-table-column>
            <el-table-column prop="thisYearInServicePersonCount" width="100" label="本年度在职招聘计划需求数" align="center" />
            <!-- <el-table-column label="备注" width="100" show-overflow-tooltip>
              <template slot-scope="scope">
                {{scope.row.remark}}
              </template>
            </el-table-column>
            <el-table-column label="操作" width="120" v-if="canEdit" key="edit3">
              <template slot-scope="scope">
                <template>
                  <el-dropdown split-button  @click="handleDetail1(scope.row,2,1)" size="small" type="primary" :loading="btnLoading">
                    修改
                    <el-dropdown-menu slot="dropdown">
                      <el-dropdown-item @click.native="handleDel1(scope.row.id)" >删除</el-dropdown-item>
                    </el-dropdown-menu>
                  </el-dropdown>
                </template>
              </template>
            </el-table-column> -->
          </el-table>
        </template>
        <template v-if="unitBeijing!==1">
          <!-- <el-button v-if="canEdit" icon="el-icon-plus" type="success" style="float:right" @click="handleAdd1(2,2)">新增</el-button> -->
          <el-button icon="el-icon-download" type="primary" style="float:right" @click="export1(2,2)">导出</el-button>
          <h1 style="text-align:center">{{theYear}}年度在职人员招聘计划申报表（京外单位填写）</h1>
          <el-table :data="list1_4" highlight-current-row v-loading="listLoading" style="width: 100%;" show-summary>
            <el-table-column type="index" label="序号" width="60" align="center">
            </el-table-column>
            <el-table-column label="单位名称" min-width="150">
              <template slot-scope="scope">
                {{scope.row.unitName}}
              </template>
            </el-table-column>
            <el-table-column prop="authorizedPersonCount" label="编制（员工控制数）" width="100" align="center">
            </el-table-column>
            <el-table-column prop="authorizedLeaderCount" label="其中领导班子职数" width="90" align="center">
            </el-table-column>
            <el-table-column prop="actualPersonCount" label="现有人员数" width="100" align="center">
            </el-table-column>
            <el-table-column prop="actualLeaderCount" label="其中领导班子人数" width="90" align="center">
            </el-table-column>
            <el-table-column prop="retireesCount" label="拟离退休人数（截至7月底）" width="90" align="center">
            </el-table-column>
            <el-table-column label="本年度拟申报的应届毕业生招聘计划数" align="center">
              <el-table-column prop="lastYearBeijingBachelorCount" width="50" label="大专" align="center" />
              <el-table-column prop="lastYearBeijingPostgraduateCount" width="50" label="本科生" align="center" />
              <el-table-column prop="lastYearBeijingBachelorCount" width="50" label="硕士研究生" align="center" />
              <el-table-column prop="lastYearBeijingPostgraduateCount" width="50" label="博士研究生" align="center" />
              <el-table-column prop="lastYearBeijingPostgraduateCount" width="50" label="其他" align="center" />
              <el-table-column prop="sum4" width="60" label="小计" align="center" />
            </el-table-column>
            <el-table-column prop="thisYearInServicePersonCount" width="100" label="本年度在职招聘计划需求数" align="center" />
            <!-- <el-table-column label="备注" width="100" show-overflow-tooltip>
              <template slot-scope="scope">
                {{scope.row.remark}}
              </template>
            </el-table-column>
            <el-table-column label="操作" width="120" v-if="canEdit" key="edit4">
              <template slot-scope="scope">
                <template>
                  <el-dropdown split-button  @click="handleDetail1(scope.row,2,2)" size="small" type="primary" :loading="btnLoading">
                    修改
                    <el-dropdown-menu slot="dropdown">
                      <el-dropdown-item @click.native="handleDel1(scope.row.id)" >删除</el-dropdown-item>
                    </el-dropdown-menu>
                  </el-dropdown>
                </template>
              </template>
            </el-table-column> -->
          </el-table>
        </template>
      </el-tab-pane>
      <!-- <el-tab-pane name="3" v-if="unitBeijing!==2"> -->
      <el-tab-pane name="3">
        <span slot="label">表4：应届毕业生招聘工作情况统计表</span>
        <!-- <el-button v-if="canEdit" icon="el-icon-plus" type="success" style="float:right" @click="handleAdd2(1,1)">新增</el-button> -->
        <el-button icon="el-icon-download" type="primary" style="float:right" @click="export2()">导出</el-button>
        <h1 style="text-align:center">{{startYear}}——{{parseInt(startYear)+2}}年度招聘工作情况统计表（在京单位填写）</h1>
        <el-table :data="list2" highlight-current-row v-loading="listLoading" style="width: 100%;">
          <el-table-column type="index" label="序号" width="60" align="center">
          </el-table-column>
          <el-table-column prop="unitName" label="单位名称" min-width="150">
          </el-table-column>
          <el-table-column :label="parseInt(startYear)+'年度毕业生留存情况'" align="center">
            <el-table-column prop="settleCount1" width="90" label="实际接收落户人数" align="center" />
            <el-table-column prop="inPostCount1" width="90" label="截止目前在岗人数" align="center" />
            <el-table-column width="70" label="留存率" align="center">
              <template slot-scope="scope">
                {{scope.row.settleCount1?(100*scope.row.inPostCount1/scope.row.settleCount1).toFixed(1):0}}%
              </template>
            </el-table-column>
          </el-table-column>
          <el-table-column :label="(parseInt(startYear)+1)+'年度毕业生留存情况'" align="center">
            <el-table-column prop="settleCount2" width="90" label="实际接收落户人数" align="center" />
            <el-table-column prop="inPostCount2" width="90" label="截止目前在岗人数" align="center" />
            <el-table-column width="70" label="留存率" align="center">
              <template slot-scope="scope">
                {{scope.row.settleCount2?(100*scope.row.inPostCount2/scope.row.settleCount2).toFixed(1):0}}%
              </template>
            </el-table-column>
          </el-table-column>
          <el-table-column :label="(parseInt(startYear)+2)+'年度毕业生留存情况'" align="center">
            <el-table-column prop="settleCount3" width="90" label="实际接收落户人数" align="center" />
            <el-table-column prop="inPostCount3" width="90" label="截止目前在岗人数" align="center" />
            <el-table-column width="70" label="留存率" align="center">
              <template slot-scope="scope">
                {{scope.row.settleCount3?(100*scope.row.inPostCount3/scope.row.settleCount3).toFixed(1):0}}%
              </template>
            </el-table-column>
          </el-table-column>
          <el-table-column prop="institutional" label="制度建设情况" width="370">
            <template slot-scope="scope">
              <div v-if="JSON.parse(scope.row.institutional).includes('A')">未制定毕业生招聘接收工作标准和规范</div>
              <div v-if="JSON.parse(scope.row.institutional).includes('B')">已建立本单位毕业生招聘接收工作标准和规范</div>
              <div v-if="JSON.parse(scope.row.institutional).includes('C')">执行上级主管部门统一招聘接收工作标准和规范</div>
            </template>
          </el-table-column>
          <el-table-column prop="remark" label="毕业生招聘接收方式" width="200">
            <template slot-scope="scope">
              <div v-if="JSON.parse(scope.row.receiveMode).includes('A')">面向社会公开招聘</div>
              <div v-if="JSON.parse(scope.row.receiveMode).includes('B')">校园招聘</div>
              <div v-if="JSON.parse(scope.row.receiveMode).includes('C')">内部推荐</div>
              <div v-if="JSON.parse(scope.row.receiveMode).includes('D')">其他：{{scope.row.receiveModeRemark}}</div>
            </template>
          </el-table-column>
          <!-- <el-table-column label="操作" width="120" v-if="canEdit" key="edit5">
            <template slot-scope="scope">
              <template>
                <el-dropdown split-button  @click="handleDetail2(scope.row)" size="small" type="primary" :loading="btnLoading">
                  修改
                  <el-dropdown-menu slot="dropdown">
                    <el-dropdown-item @click.native="handleDel2(scope.row.id)" >删除</el-dropdown-item>
                  </el-dropdown-menu>
                </el-dropdown>
              </template>
            </template>
          </el-table-column> -->
        </el-table>
      </el-tab-pane>
      <el-tab-pane name="4">
        <span slot="label">表5：招聘应届毕业生留存情况表</span>
        <template v-if="unitBeijing!==2">
          <!-- <el-button v-if="canEdit" icon="el-icon-plus" type="success" style="float:right" @click="handleAdd3(null,1)">新增</el-button> -->
          <el-button icon="el-icon-download" type="primary" style="float:right" @click="export3(1)">导出</el-button>
          <h1 style="text-align:center">{{startYear}}——{{parseInt(startYear)+2}}年度招聘应届毕业生留存情况表（在京单位填写）</h1>
          <el-table :data="list3_1" highlight-current-row v-loading="listLoading" style="width: 100%;margin-bottom: 20px;">
            <el-table-column prop="unitName" label="单位名称" min-width="100">
            </el-table-column>
            <el-table-column label="毕业生留存率（填写接收的所有毕业生情况，含京内、京外生源）" align="center">
              <el-table-column :label="startYear+'年'" align="center">
                <el-table-column label="实际接收人数" align="center">
                  <el-table-column prop="settleUndergraduateCount1" width="55" label="大专" align="center" />
                  <el-table-column prop="settleUndergraduateCount1" width="55" label="本科生" align="center" />
                  <el-table-column prop="settleMasterCount1" width="55" label="硕士研究生" align="center" />
                  <el-table-column prop="settleDoctorCount1" width="55" label="博士研究生" align="center" />
                  <el-table-column prop="settleDoctorCount1" width="55" label="其他" align="center" />
                  <el-table-column prop="sum3_1_1" width="55" label="合计" align="center" />
                </el-table-column>
                <el-table-column label="目前在岗人数" align="center">
                  <el-table-column prop="settleUndergraduateCount1" width="55" label="大专" align="center" />
                  <el-table-column prop="settleUndergraduateCount1" width="55" label="本科生" align="center" />
                  <el-table-column prop="settleMasterCount1" width="55" label="硕士研究生" align="center" />
                  <el-table-column prop="settleDoctorCount1" width="55" label="博士研究生" align="center" />
                  <el-table-column prop="settleDoctorCount1" width="55" label="其他" align="center" />
                  <el-table-column prop="sum3_1_1" width="55" label="合计" align="center" />
                </el-table-column>
                <el-table-column prop="prop3_1" width="70" label="留存率" align="center" />
              </el-table-column>
              <el-table-column :label="(parseInt(startYear)+1)+'年'" align="center">
                <el-table-column label="实际接收人数" align="center">
                  <el-table-column prop="settleUndergraduateCount1" width="55" label="大专" align="center" />
                  <el-table-column prop="settleUndergraduateCount1" width="55" label="本科生" align="center" />
                  <el-table-column prop="settleMasterCount1" width="55" label="硕士研究生" align="center" />
                  <el-table-column prop="settleDoctorCount1" width="55" label="博士研究生" align="center" />
                  <el-table-column prop="settleDoctorCount1" width="55" label="其他" align="center" />
                  <el-table-column prop="sum3_1_1" width="55" label="合计" align="center" />
                </el-table-column>
                <el-table-column label="目前在岗人数" align="center">
                  <el-table-column prop="settleUndergraduateCount1" width="55" label="大专" align="center" />
                  <el-table-column prop="settleUndergraduateCount1" width="55" label="本科生" align="center" />
                  <el-table-column prop="settleMasterCount1" width="55" label="硕士研究生" align="center" />
                  <el-table-column prop="settleDoctorCount1" width="55" label="博士研究生" align="center" />
                  <el-table-column prop="settleDoctorCount1" width="55" label="其他" align="center" />
                  <el-table-column prop="sum3_1_1" width="55" label="合计" align="center" />
                </el-table-column>
                <el-table-column prop="prop3_2" width="70" label="留存率" align="center" />
              </el-table-column>
              <el-table-column :label="(parseInt(startYear)+2)+'年'" align="center">
                <el-table-column label="实际接收人数" align="center">
                  <el-table-column prop="settleUndergraduateCount1" width="55" label="大专" align="center" />
                  <el-table-column prop="settleUndergraduateCount1" width="55" label="本科生" align="center" />
                  <el-table-column prop="settleMasterCount1" width="55" label="硕士研究生" align="center" />
                  <el-table-column prop="settleDoctorCount1" width="55" label="博士研究生" align="center" />
                  <el-table-column prop="settleDoctorCount1" width="55" label="其他" align="center" />
                  <el-table-column prop="sum3_1_1" width="55" label="合计" align="center" />
                </el-table-column>
                <el-table-column label="目前在岗人数" align="center">
                  <el-table-column prop="settleUndergraduateCount1" width="55" label="大专" align="center" />
                  <el-table-column prop="settleUndergraduateCount1" width="55" label="本科生" align="center" />
                  <el-table-column prop="settleMasterCount1" width="55" label="硕士研究生" align="center" />
                  <el-table-column prop="settleDoctorCount1" width="55" label="博士研究生" align="center" />
                  <el-table-column prop="settleDoctorCount1" width="55" label="其他" align="center" />
                  <el-table-column prop="sum3_1_1" width="55" label="合计" align="center" />
                </el-table-column>
                <el-table-column prop="prop3_3" width="70" label="留存率" align="center" />
              </el-table-column>
            </el-table-column>
            <!-- <el-table-column label="操作" width="110" v-show="canEdit">
              <template slot-scope="scope">
                <template>
                  <el-dropdown split-button  @click="handleDetail3(scope.row,null,1)" size="small" type="primary" :loading="btnLoading">
                    修改
                    <el-dropdown-menu slot="dropdown">
                      <el-dropdown-item @click.native="handleDel3(scope.row.id)" >删除</el-dropdown-item>
                    </el-dropdown-menu>
                  </el-dropdown>
                </template>
              </template>
            </el-table-column> -->
          </el-table>
        </template>
        <template v-if="unitBeijing!==1">
          <!-- <el-button v-if="canEdit" icon="el-icon-plus" type="success" style="float:right" @click="handleAdd3(null,2)">新增</el-button> -->
          <el-button icon="el-icon-download" type="primary" style="float:right" @click="export3(2)">导出</el-button>
          <h1 style="text-align:center">{{startYear}}——{{parseInt(startYear)+2}}年度招聘应届毕业生留存情况表（京外单位填写）</h1>
          <el-table :data="list3_2" highlight-current-row v-loading="listLoading" style="width: 100%;">
            <el-table-column prop="unitName" label="单位名称" min-width="100">
            </el-table-column>
            <el-table-column label="毕业生留存率" align="center">
              <el-table-column :label="startYear+'年'" align="center">
                <el-table-column label="实际接收人数" align="center">
                  <el-table-column prop="settleUndergraduateCount1" width="40" label="大专" align="center" />
                  <el-table-column prop="settleUndergraduateCount1" width="40" label="本科生" align="center" />
                  <el-table-column prop="settleMasterCount1" width="40" label="硕士研究生" align="center" />
                  <el-table-column prop="settleDoctorCount1" width="40" label="博士研究生" align="center" />
                  <el-table-column prop="settleDoctorCount1" width="40" label="其他" align="center" />
                  <el-table-column prop="sum3_1_1" width="40" label="合计" align="center" />
                </el-table-column>
                <el-table-column label="目前在岗人数" align="center">
                  <el-table-column prop="settleUndergraduateCount1" width="40" label="大专" align="center" />
                  <el-table-column prop="settleUndergraduateCount1" width="40" label="本科生" align="center" />
                  <el-table-column prop="settleMasterCount1" width="40" label="硕士研究生" align="center" />
                  <el-table-column prop="settleDoctorCount1" width="40" label="博士研究生" align="center" />
                  <el-table-column prop="settleDoctorCount1" width="40" label="其他" align="center" />
                  <el-table-column prop="sum3_1_1" width="40" label="合计" align="center" />
                </el-table-column>
                <el-table-column prop="prop3_1" width="70" label="留存率" align="center" />
              </el-table-column>
              <el-table-column :label="(parseInt(startYear)+1)+'年'" align="center">
                <el-table-column label="实际接收人数" align="center">
                  <el-table-column prop="settleUndergraduateCount1" width="40" label="大专" align="center" />
                  <el-table-column prop="settleUndergraduateCount1" width="40" label="本科生" align="center" />
                  <el-table-column prop="settleMasterCount1" width="40" label="硕士研究生" align="center" />
                  <el-table-column prop="settleDoctorCount1" width="40" label="博士研究生" align="center" />
                  <el-table-column prop="settleDoctorCount1" width="40" label="其他" align="center" />
                  <el-table-column prop="sum3_1_1" width="40" label="合计" align="center" />
                </el-table-column>
                <el-table-column label="目前在岗人数" align="center">
                  <el-table-column prop="settleUndergraduateCount1" width="40" label="大专" align="center" />
                  <el-table-column prop="settleUndergraduateCount1" width="40" label="本科生" align="center" />
                  <el-table-column prop="settleMasterCount1" width="40" label="硕士研究生" align="center" />
                  <el-table-column prop="settleDoctorCount1" width="40" label="博士研究生" align="center" />
                  <el-table-column prop="settleDoctorCount1" width="40" label="其他" align="center" />
                  <el-table-column prop="sum3_1_1" width="40" label="合计" align="center" />
                </el-table-column>
                <el-table-column prop="prop3_2" width="70" label="留存率" align="center" />
              </el-table-column>
              <el-table-column :label="(parseInt(startYear)+2)+'年'" align="center">
                <el-table-column label="实际接收人数" align="center">
                  <el-table-column prop="settleUndergraduateCount1" width="40" label="大专" align="center" />
                  <el-table-column prop="settleUndergraduateCount1" width="40" label="本科生" align="center" />
                  <el-table-column prop="settleMasterCount1" width="40" label="硕士研究生" align="center" />
                  <el-table-column prop="settleDoctorCount1" width="40" label="博士研究生" align="center" />
                  <el-table-column prop="settleDoctorCount1" width="40" label="其他" align="center" />
                  <el-table-column prop="sum3_1_1" width="40" label="合计" align="center" />
                </el-table-column>
                <el-table-column label="目前在岗人数" align="center">
                  <el-table-column prop="settleUndergraduateCount1" width="40" label="大专" align="center" />
                  <el-table-column prop="settleUndergraduateCount1" width="40" label="本科生" align="center" />
                  <el-table-column prop="settleMasterCount1" width="40" label="硕士研究生" align="center" />
                  <el-table-column prop="settleDoctorCount1" width="40" label="博士研究生" align="center" />
                  <el-table-column prop="settleDoctorCount1" width="40" label="其他" align="center" />
                  <el-table-column prop="sum3_1_1" width="40" label="合计" align="center" />
                </el-table-column>
                <el-table-column prop="prop3_3" width="70" label="留存率" align="center" />
              </el-table-column>
            </el-table-column>
            <!-- <el-table-column label="操作" width="110" v-show="canEdit">
              <template slot-scope="scope">
                <template>
                  <el-dropdown split-button  @click="handleDetail3(scope.row,null,2)" size="small" type="primary" :loading="btnLoading">
                    修改
                    <el-dropdown-menu slot="dropdown">
                      <el-dropdown-item @click.native="handleDel3(scope.row.id)" >删除</el-dropdown-item>
                    </el-dropdown-menu>
                  </el-dropdown>
                </template>
              </template>
            </el-table-column> -->
          </el-table>
        </template>
      </el-tab-pane>
      <el-tab-pane name="5">
        <span slot="label">表6：招聘应届毕业生情况明细表</span>
        <template v-if="unitBeijing!==2">
          <!-- <el-upload v-if="canEdit" style="margin:0;float:right;margin-left:10px" class="upload-demo" :before-upload="beforeAvatarUpload" :on-success="getImportList" :on-error="uploadError" name="file" :show-file-list="false"
            :action="this.$http.defaults.baseURL + this.$http.defaults.recruitAPI + 'api/recruitBusPlanDeclareTable4/saveImportJn?unitBatchId='+this.unitBatchId" with-credentials accept="vnd.openxmlformats-officedocument.spreadsheetml.sheet">
            <el-button icon="el-icon-upload2" type="success" :loading="saveloading">批量导入</el-button>
          </el-upload>
          <el-button v-if="canEdit" icon="el-icon-download" type="primary" style="float:right;margin-left:10px" @click="downloadTemplate(1)">下载模板</el-button>
          <el-button v-if="canEdit" icon="el-icon-plus" type="success" style="float:right" @click="handleAdd4(null,1)">新增</el-button> -->
          <el-button icon="el-icon-download" type="primary" style="float:right" @click="export4(1)">导出</el-button>
          <h1 style="text-align:center">{{startYear}}——{{parseInt(startYear)+2}}年度招聘应届毕业生情况明细表（在京单位填写）</h1>
          <el-table :data="list4_1" highlight-current-row v-loading="listLoading" style="width: 100%;margin-bottom: 20px;">
            <el-table-column type="index" label="序号" width="60" align="center">
            </el-table-column>
            <el-table-column prop="theYear" label="接收年份" width="100" align="center">
            </el-table-column>
            <el-table-column prop="unitName" label="单位名称" min-width="150">
            </el-table-column>
            <el-table-column prop="department" label="部门名称" width="120" align="center">
            </el-table-column>
            <el-table-column prop="post" label="工作岗位（职位）" width="150" align="center">
            </el-table-column>
            <el-table-column prop="realName" label="姓名" width="80" align="center">
            </el-table-column>
            <el-table-column prop="inBeijing" label="生源（京内/京外）" width="90" align="center">
              <template slot-scope="scope">
                {{scope.row.inBeijing===1?'京内':'京外'}}
              </template>
            </el-table-column>
            <el-table-column prop="school" label="院校" width="150" align="center">
            </el-table-column>
            <el-table-column prop="major" label="所学专业" width="150" align="center">
            </el-table-column>
            <el-table-column prop="inPost" label="是否在岗" width="90" align="center">
              <template slot-scope="scope">
                {{scope.row.inPost?'是':'否'}}
              </template>
            </el-table-column>
            <el-table-column prop="remark" label="备注" width="150">
            </el-table-column>
            <!-- <el-table-column label="操作" width="120" v-if="canEdit" key="edit6">
              <template slot-scope="scope">
                <template>
                  <el-dropdown split-button  @click="handleDetail4(scope.row,null,1)" size="small" type="primary" :loading="btnLoading">
                    修改
                    <el-dropdown-menu slot="dropdown">
                      <el-dropdown-item @click.native="handleDel4(scope.row.id)" >删除</el-dropdown-item>
                    </el-dropdown-menu>
                  </el-dropdown>
                </template>
              </template>
            </el-table-column> -->
          </el-table>
        </template>
        <template v-if="unitBeijing!==1">
          <!-- <el-upload v-if="canEdit" style="margin:0;float:right;margin-left:10px" class="upload-demo" :before-upload="beforeAvatarUpload" :on-success="getImportList" :on-error="uploadError" name="file" :show-file-list="false"
            :action="this.$http.defaults.baseURL + this.$http.defaults.recruitAPI + 'api/recruitBusPlanDeclareTable4/saveImportJw?unitBatchId='+this.unitBatchId" with-credentials accept="vnd.openxmlformats-officedocument.spreadsheetml.sheet">
            <el-button icon="el-icon-upload2" type="success" :loading="saveloading">批量导入</el-button>
          </el-upload>
          <el-button v-if="canEdit" icon="el-icon-download" type="primary" style="float:right;margin-left:10px" @click="downloadTemplate(2)">下载模板</el-button>
          <el-button v-if="canEdit" icon="el-icon-plus" type="success" style="float:right" @click="handleAdd4(null,2)">新增</el-button> -->
          <el-button icon="el-icon-download" type="primary" style="float:right" @click="export4(2)">导出</el-button>
          <h1 style="text-align:center">{{startYear}}——{{parseInt(startYear)+2}}年度接收高校毕业生情况明细表（京外单位填写）</h1>
          <el-table :data="list4_2" highlight-current-row v-loading="listLoading" style="width: 100%;">
            <el-table-column type="index" label="序号" width="60" align="center">
            </el-table-column>
            <el-table-column prop="theYear" label="接收年份" width="100" align="center">
            </el-table-column>
            <el-table-column prop="unitName" label="单位名称" min-width="150">
            </el-table-column>
            <el-table-column prop="department" label="部门名称" width="120" align="center">
            </el-table-column>
            <el-table-column prop="post" label="工作岗位（职位）" width="150" align="center">
            </el-table-column>
            <el-table-column prop="realName" label="姓名" width="80" align="center">
            </el-table-column>
            <el-table-column prop="school" label="院校" width="190" align="center">
            </el-table-column>
            <el-table-column prop="major" label="所学专业" width="200" align="center">
            </el-table-column>
            <el-table-column prop="inPost" label="是否在岗" width="90" align="center">
              <template slot-scope="scope">
                {{scope.row.inPost?'是':'否'}}
              </template>
            </el-table-column>
            <el-table-column prop="remark" label="备注" width="150">
            </el-table-column>
            <!-- <el-table-column label="操作" width="120" v-if="canEdit" key="edit7">
              <template slot-scope="scope">
                <template>
                  <el-dropdown split-button  @click="handleDetail4(scope.row,null,2)" size="small" type="primary" :loading="btnLoading">
                    修改
                    <el-dropdown-menu slot="dropdown">
                      <el-dropdown-item @click.native="handleDel4(scope.row.id)" >删除</el-dropdown-item>
                    </el-dropdown-menu>
                  </el-dropdown>
                </template>
              </template>
            </el-table-column> -->
          </el-table>
        </template>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>
<script>
export default {
  props: {
    batchState: null,
    timestamp: '',
    canEdit: null,
    unitBatchId: null,
    type: null,
    theYear: null,
    startYear: null,
    state: null,
    canAudit: null,
    unitBeijing: null
  },
  data () {
    return {
      errorList: [],
      errorVisible: false,
      yearList: [],
      yearList2: [],
      yearForm: {startYear: null},
      yearFormVisible: false,
      yearFormRules1: {
        startYear: [
          { required: true, message: '必填', trigger: 'blur' }
        ]
      },
      backForm: {remark: ''},
      backFormVisible: false,
      editForm: {},
      editFormRules1: {
        unitName: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        authorizedPersonCount: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        authorizedLeaderCount: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        actualPersonCount: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        actualLeaderCount: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        retireesCount: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        lastYearBeijingBachelorCount: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        lastYearBeijingPostgraduateCount: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        lastYearBachelorCount: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        lastYearPostgraduateCount: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        thisYearDoctorCount: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        thisYearBeijingBachelorCount: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        thisYearBeijingPostgraduateCount: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        thisYearBachelorCount: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        thisYearPostgraduateCount: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        thisYearInServicePersonCount: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        beijingPostgraduateCount: [
          { required: true, message: '必填', trigger: 'blur' }
        ]
      },
      fileListLoading: false,
      saveloading: false,
      files1_1: [],
      files1_2: [],
      files2: [],
      files3: [],
      files4: [],
      files5: [],
      files6: [],
      dialogTitle: '新增',
      editLoading: false,
      fileList: [],
      btnLoading: false,
      editForm1: {
        id: null,
        unitName: '',
        authorizedPersonCount: 0,
        authorizedLeaderCount: 0,
        actualPersonCount: 0,
        actualLeaderCount: 0,
        retireesCount: 0,
        lastYearBeijingBachelorCount: 0,
        lastYearBeijingPostgraduateCount: 0,
        lastYearBachelorCount: 0,
        lastYearPostgraduateCount: 0,
        thisYearDoctorCount: 0,
        thisYearBeijingBachelorCount: 0,
        thisYearBeijingPostgraduateCount: 0,
        thisYearBachelorCount: 0,
        thisYearPostgraduateCount: 0,
        thisYearInServicePersonCount: 0,
        beijingPostgraduateCount: 0,
        remark: ''
      },
      editForm2: {
        id: null,
        unitName: '',
        settleCount1: 0,
        settleCount2: 0,
        settleCount3: 0,
        inPostCount1: 0,
        inPostCount2: 0,
        inPostCount3: 0,
        institutional: [],
        receiveMode: [],
        receiveModeRemark: ''
      },
      editFormRules2: {
        unitName: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        settleCount1: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        settleCount2: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        settleCount3: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        inPostCount1: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        inPostCount2: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        inPostCount3: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        institutional: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        receiveMode: [
          { required: true, message: '必填', trigger: 'blur' }
        ]
      },
      editForm3: {
        id: null,
        unitName: '',
        settleUndergraduateCount1: 0,
        settleUndergraduateCount2: 0,
        settleUndergraduateCount3: 0,
        settleMasterCount1: 0,
        settleMasterCount2: 0,
        settleMasterCount3: 0,
        settleDoctorCount1: 0,
        settleDoctorCount2: 0,
        settleDoctorCount3: 0,
        inPostUndergraduateCount1: 0,
        inPostUndergraduateCount2: 0,
        inPostUndergraduateCount3: 0,
        inPostMasterCount1: 0,
        inPostMasterCount2: 0,
        inPostMasterCount3: 0,
        inPostDoctorCount1: 0,
        inPostDoctorCount2: 0,
        inPostDoctorCount3: 0
      },
      editFormRules3: {
        unitName: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        settleUndergraduateCount1: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        settleUndergraduateCount2: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        settleUndergraduateCount3: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        settleMasterCount1: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        settleMasterCount2: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        settleMasterCount3: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        settleDoctorCount1: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        settleDoctorCount2: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        settleDoctorCount3: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        inPostUndergraduateCount1: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        inPostUndergraduateCount2: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        inPostUndergraduateCount3: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        inPostMasterCount1: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        inPostMasterCount2: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        inPostMasterCount3: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        inPostDoctorCount1: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        inPostDoctorCount2: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        inPostDoctorCount3: [
          { required: true, message: '必填', trigger: 'blur' }
        ]
      },
      editForm4: {
        id: null,
        unitName: '',
        theYear: null,
        department: '',
        realName: null,
        idCardNo: null,
        post: '',
        school: '',
        major: '',
        inPost: null,
        inBeijing: null,
        remark: ''
      },
      editFormRules4: {
        unitName: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        theYear: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        department: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        realName: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        idCardNo: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        post: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        school: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        major: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        inPost: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        inBeijing: [
          { required: true, message: '必填', trigger: 'blur' }
        ]
      },
      editForm5: {
        id: null,
        unitName: '',
        department: '',
        post: '',
        major: '',
        countBeijing1: 0,
        countBeijing2: 0,
        countBeijing3: 0,
        countBeijing4: 0,
        countBeijing5: 0,
        count1: 0,
        count2: 0,
        count3: 0,
        count4: 0,
        count5: 0
      },
      editFormRules5: {
        unitName: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        department: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        post: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        major: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        countBeijing1: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        countBeijing2: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        countBeijing3: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        countBeijing4: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        countBeijing5: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        count1: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        count2: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        count3: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        count4: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        count5: [
          { required: true, message: '必填', trigger: 'blur' }
        ]
      },
      editForm6: {
        id: null,
        unitName: '',
        department: '',
        post: '',
        personCount: 0,
        residenceRequirements: '',
        education: '',
        major: '',
        others: '',
        unitBeijing: '',
        remark: ''
      },
      editFormRules6: {
        unitName: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        department: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        post: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        personCount: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        residenceRequirements: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        education: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        major: [
          { required: true, message: '必填', trigger: 'blur' }
        ],
        unitBeijing: [
          { required: true, message: '必填', trigger: 'blur' }
        ]
      },
      theType1: null,
      unitBeijing1: null,
      unitBeijing3: null,
      unitBeijing4: null,
      unitBeijing5: null,
      editFormVisible1: false,
      editFormVisible2: false,
      editFormVisible3: false,
      editFormVisible4: false,
      editFormVisible5: false,
      editFormVisible6: false,
      addLoading: false,
      list1_1: [],
      list1_2: [],
      list1_3: [],
      list1_4: [],
      list2: [],
      list3_1: [],
      list3_2: [],
      list4_1: [],
      list4_2: [],
      list5_1: [],
      list5_2: [],
      list6: [],
      topersonlist: [],
      activeName: '6',
      listLoading: false
    }
  },
  watch: {
    timestamp (val) {
      this.init()
    },
    canEdit (val) {
      console.log(val)
    },
    type (val) {
      console.log(val)
    },
    unitBatchId (val) {
      console.log(val)
    },
    theYear (val) {
      console.log(val)
    },
    startYear (val) {
      console.log(val)
    },
    state (val) {
      console.log(val)
    },
    batchState (val) {
      console.log(val)
    },
    canAudit (val) {
      console.log(val)
    },
    unitBeijing (val) {
      console.log(val)
    }
  },
  methods: {
    getImportList (res) {
      this.saveloading = false
      if (res.success) {
        if (res.result && res.result.length > 0) {
          this.errorList = res.result
          this.errorVisible = true
        } else {
          this.$message({
            message: '导入成功！',
            type: 'success'
          })
          this.getList4()
        }
      } else {
        this.$message({
          message: '导入失败:' + res.message,
          type: 'error'
        })
      }
    },
    beforeAvatarUpload (file) {
      console.log('文件类型')
      console.log(file.name)
      const isFormat = file.name.indexOf('.xlsx') > 0
      // const isLt5M = file.size / 1024 / 1024 < 500
      if (!isFormat) {
        this.$message.error('上传文件只能是 .xlsx 格式!')
      }
      return isFormat
    },
    export1 (type, unitBeijing) {
      window.open(this.$http.defaults.baseURL + this.$http.defaults.recruitAPI + 'api/recruitBusPlanDeclareTable1/export?unitBatchId=' + this.unitBatchId + '&unitBeijing=' + unitBeijing + '&type=' + type)
    },
    export2 () {
      window.open(this.$http.defaults.baseURL + this.$http.defaults.recruitAPI + 'api/recruitBusPlanDeclareTable2/export?unitBatchId=' + this.unitBatchId)
    },
    export3 (unitBeijing) {
      window.open(this.$http.defaults.baseURL + this.$http.defaults.recruitAPI + 'api/recruitBusPlanDeclareTable3/export?unitBatchId=' + this.unitBatchId + '&unitBeijing=' + unitBeijing)
    },
    export4 (unitBeijing) {
      window.open(this.$http.defaults.baseURL + this.$http.defaults.recruitAPI + 'api/recruitBusPlanDeclareTable4/export?unitBatchId=' + this.unitBatchId + '&unitBeijing=' + unitBeijing)
    },
    export5 (unitBeijing) {
      window.open(this.$http.defaults.baseURL + this.$http.defaults.recruitAPI + 'api/recruitBusPlanDeclareTable5/export?unitBatchId=' + this.unitBatchId + '&unitBeijing=' + unitBeijing)
    },
    export6 () {
      window.open(this.$http.defaults.baseURL + this.$http.defaults.recruitAPI + 'api/recruitBusPlanDeclareTable6/export?unitBatchId=' + this.unitBatchId)
    },
    downloadTemplate (unitBeijing) {
      window.open(this.$http.defaults.baseURL + this.$http.defaults.recruitAPI + 'api/recruitBusPlanDeclareTable4/template?unitBeijing=' + unitBeijing)
    },
    editStartYear () {
      this.yearForm.startYear = parseInt(this.startYear)
      this.yearFormVisible = true
    },
    setStartYear () {
      let para = {
        startYear: this.yearForm.startYear,
        id: this.unitBatchId
      }
      this.btnLoading = true
      this.$http.post(this.$http.defaults.recruitAPI + `api/recruitBusUnitBatch/save`, para).then(response => {
        this.btnLoading = false
        if (response.data.success === true) {
          this.$message({
            message: '操作成功',
            type: 'success'
          })
          this.$emit('getDetails')
          this.yearFormVisible = false
        } else {
          console.log('操作失败:' + response.data.message)
          this.$message({
            message: '操作失败:' + response.data.message,
            type: 'error'
          })
        }
      }).catch(error => {
        this.btnLoading = false
        console.log(error)
        this.$message({
          message: '操作失败:' + error,
          type: 'error'
        })
      })
    },
    showBack () {
      this.backFormVisible = true
      this.backForm.remark = ''
    },
    init () {
      let startYear = parseInt(this.startYear)
      let theYear = parseInt(this.theYear)
      this.yearForm.startYear = startYear
      this.yearList = []
      for (let i = theYear - 2; i > theYear - 5; i--) {
        console.log(i)
        this.yearList.push(i)
      }
      this.yearList2 = []
      for (let i = theYear; i > theYear - 5; i--) {
        console.log(i)
        this.yearList2.push(i)
      }
      this.getList5()
      this.getFileList('bus_plan_declare_table1', 'files1')
    },
    editFormSubmit1 () {
      this.$refs.editForm1.validate((valid) => {
        if (valid) {
          this.editLoading = true
          let para = {
            id: this.editForm1.id,
            unitName: this.editForm1.unitName,
            authorizedPersonCount: this.editForm1.authorizedPersonCount,
            authorizedLeaderCount: this.editForm1.authorizedLeaderCount,
            actualPersonCount: this.editForm1.actualPersonCount,
            actualLeaderCount: this.editForm1.actualLeaderCount,
            retireesCount: this.editForm1.retireesCount,
            lastYearBeijingBachelorCount: this.editForm1.lastYearBeijingBachelorCount,
            lastYearBeijingPostgraduateCount: this.editForm1.lastYearBeijingPostgraduateCount,
            lastYearBachelorCount: this.editForm1.lastYearBachelorCount,
            lastYearPostgraduateCount: this.editForm1.lastYearPostgraduateCount,
            thisYearDoctorCount: this.editForm1.thisYearDoctorCount,
            thisYearBeijingBachelorCount: this.editForm1.thisYearBeijingBachelorCount,
            thisYearBeijingPostgraduateCount: this.editForm1.thisYearBeijingPostgraduateCount,
            thisYearBachelorCount: this.editForm1.thisYearBachelorCount,
            thisYearPostgraduateCount: this.editForm1.thisYearPostgraduateCount,
            thisYearInServicePersonCount: this.editForm1.thisYearInServicePersonCount,
            beijingPostgraduateCount: this.editForm1.beijingPostgraduateCount,
            remark: this.editForm1.remark,
            theType: this.theType1,
            unitBatchId: this.unitBatchId,
            unitBeijing: this.unitBeijing1
          }
          this.$http.post(this.$http.defaults.recruitAPI + `api/recruitBusPlanDeclareTable1/save`, para).then(response => {
            console.log(response.data.success)
            if (response.data.success === true) {
              this.$message({
                message: '提交成功',
                type: 'success'
              })
              this.editFormVisible1 = false
              this.editLoading = false
              this.getList1()
            } else {
              console.log('提交失败:' + response.data.message)
              this.$message({
                message: '提交失败:' + response.data.message,
                type: 'error'
              })
              this.editLoading = false
            }
          }).catch(error => {
            console.log(error)
            this.$message({
              message: '提交失败:' + error,
              type: 'error'
            })
            this.editLoading = false
          })
        }
      })
    },
    editFormSubmit2 () {
      if (this.editForm2.receiveMode.includes('D') && this.editForm2.receiveModeRemark === '') {
        this.$message({
          message: '毕业生招聘接收方式如选其他，请填写文字注明具体接收方式',
          type: 'error'
        })
        return false
      }
      this.$refs.editForm2.validate((valid) => {
        if (valid) {
          this.editLoading = true
          let para = {
            id: this.editForm2.id,
            unitName: this.editForm2.unitName,
            settleCount1: this.editForm2.settleCount1,
            settleCount2: this.editForm2.settleCount2,
            settleCount3: this.editForm2.settleCount3,
            inPostCount1: this.editForm2.inPostCount1,
            inPostCount2: this.editForm2.inPostCount2,
            inPostCount3: this.editForm2.inPostCount3,
            institutional: JSON.stringify(this.editForm2.institutional),
            receiveMode: JSON.stringify(this.editForm2.receiveMode),
            receiveModeRemark: this.editForm2.receiveModeRemark,
            unitBatchId: this.unitBatchId
          }
          this.$http.post(this.$http.defaults.recruitAPI + `api/recruitBusPlanDeclareTable2/save`, para).then(response => {
            console.log(response.data.success)
            if (response.data.success === true) {
              this.$message({
                message: '提交成功',
                type: 'success'
              })
              this.editFormVisible2 = false
              this.editLoading = false
              this.getList2()
            } else {
              console.log('提交失败:' + response.data.message)
              this.$message({
                message: '提交失败:' + response.data.message,
                type: 'error'
              })
              this.editLoading = false
            }
          }).catch(error => {
            console.log(error)
            this.$message({
              message: '提交失败:' + error,
              type: 'error'
            })
            this.editLoading = false
          })
        }
      })
    },
    editFormSubmit3 () {
      this.$refs.editForm3.validate((valid) => {
        if (valid) {
          this.editLoading = true
          let para = {
            id: this.editForm3.id,
            unitName: this.editForm3.unitName,
            settleUndergraduateCount1: this.editForm3.settleUndergraduateCount1,
            settleUndergraduateCount2: this.editForm3.settleUndergraduateCount2,
            settleUndergraduateCount3: this.editForm3.settleUndergraduateCount3,
            settleMasterCount1: this.editForm3.settleMasterCount1,
            settleMasterCount2: this.editForm3.settleMasterCount2,
            settleMasterCount3: this.editForm3.settleMasterCount3,
            settleDoctorCount1: this.editForm3.settleDoctorCount1,
            settleDoctorCount2: this.editForm3.settleDoctorCount2,
            settleDoctorCount3: this.editForm3.settleDoctorCount3,
            inPostUndergraduateCount1: this.editForm3.inPostUndergraduateCount1,
            inPostUndergraduateCount2: this.editForm3.inPostUndergraduateCount2,
            inPostUndergraduateCount3: this.editForm3.inPostUndergraduateCount3,
            inPostMasterCount1: this.editForm3.inPostMasterCount1,
            inPostMasterCount2: this.editForm3.inPostMasterCount2,
            inPostMasterCount3: this.editForm3.inPostMasterCount3,
            inPostDoctorCount1: this.editForm3.inPostDoctorCount1,
            inPostDoctorCount2: this.editForm3.inPostDoctorCount2,
            inPostDoctorCount3: this.editForm3.inPostDoctorCount3,
            unitBeijing: this.unitBeijing3,
            unitBatchId: this.unitBatchId
          }
          this.$http.post(this.$http.defaults.recruitAPI + `api/recruitBusPlanDeclareTable3/save`, para).then(response => {
            console.log(response.data.success)
            if (response.data.success === true) {
              this.$message({
                message: '提交成功',
                type: 'success'
              })
              this.editFormVisible3 = false
              this.editLoading = false
              this.getList3()
            } else {
              console.log('提交失败:' + response.data.message)
              this.$message({
                message: '提交失败:' + response.data.message,
                type: 'error'
              })
              this.editLoading = false
            }
          }).catch(error => {
            console.log(error)
            this.$message({
              message: '提交失败:' + error,
              type: 'error'
            })
            this.editLoading = false
          })
        }
      })
    },
    editFormSubmit4 () {
      this.$refs.editForm4.validate((valid) => {
        if (valid) {
          this.editLoading = true
          let para = {
            id: this.editForm4.id,
            unitName: this.editForm4.unitName,
            unitBatchId: this.unitBatchId,
            theYear: this.editForm4.theYear,
            department: this.editForm4.department,
            realName: this.editForm4.realName,
            idCardNo: this.editForm4.idCardNo,
            post: this.editForm4.post,
            school: this.editForm4.school,
            major: this.editForm4.major,
            inPost: this.editForm4.inPost,
            inBeijing: this.editForm4.inBeijing,
            remark: this.editForm4.remark,
            unitBeijing: this.unitBeijing4
          }
          this.$http.post(this.$http.defaults.recruitAPI + `api/recruitBusPlanDeclareTable4/save`, para).then(response => {
            console.log(response.data.success)
            if (response.data.success === true) {
              this.$message({
                message: '提交成功',
                type: 'success'
              })
              this.editFormVisible4 = false
              this.editLoading = false
              this.getList4()
            } else {
              console.log('提交失败:' + response.data.message)
              this.$message({
                message: '提交失败:' + response.data.message,
                type: 'error'
              })
              this.editLoading = false
            }
          }).catch(error => {
            console.log(error)
            this.$message({
              message: '提交失败:' + error,
              type: 'error'
            })
            this.editLoading = false
          })
        }
      })
    },
    editFormSubmit5 () {
      this.$refs.editForm5.validate((valid) => {
        if (valid) {
          this.editLoading = true
          let para = {
            id: this.editForm5.id,
            unitName: this.editForm5.unitName,
            department: this.editForm5.department,
            post: this.editForm5.post,
            major: this.editForm5.major,
            countBeijing1: this.editForm5.countBeijing1,
            countBeijing2: this.editForm5.countBeijing2,
            countBeijing3: this.editForm5.countBeijing3,
            countBeijing4: this.editForm5.countBeijing4,
            countBeijing5: this.editForm5.countBeijing5,
            count1: this.editForm5.count1,
            count2: this.editForm5.count2,
            count3: this.editForm5.count3,
            count4: this.editForm5.count4,
            count5: this.editForm5.count5,
            unitBatchId: this.unitBatchId,
            unitBeijing: this.unitBeijing5
          }
          this.$http.post(this.$http.defaults.recruitAPI + `api/recruitBusPlanDeclareTable5/save`, para).then(response => {
            console.log(response.data.success)
            if (response.data.success === true) {
              this.$message({
                message: '提交成功',
                type: 'success'
              })
              this.editFormVisible5 = false
              this.editLoading = false
              this.getList5()
            } else {
              console.log('提交失败:' + response.data.message)
              this.$message({
                message: '提交失败:' + response.data.message,
                type: 'error'
              })
              this.editLoading = false
            }
          }).catch(error => {
            console.log(error)
            this.$message({
              message: '提交失败:' + error,
              type: 'error'
            })
            this.editLoading = false
          })
        }
      })
    },
    editFormSubmit6 () {
      this.$refs.editForm6.validate((valid) => {
        if (valid) {
          this.editLoading = true
          let para = {
            id: this.editForm6.id,
            unitName: this.editForm6.unitName,
            department: this.editForm6.department,
            post: this.editForm6.post,
            personCount: this.editForm6.personCount,
            residenceRequirements: this.editForm6.residenceRequirements,
            education: this.editForm6.education,
            major: this.editForm6.major,
            others: this.editForm6.others,
            remark: this.editForm6.remark,
            unitBeijing: this.unitBeijing === 3 ? this.editForm6.unitBeijing : this.unitBeijing,
            unitBatchId: this.unitBatchId
          }
          this.$http.post(this.$http.defaults.recruitAPI + `api/recruitBusPlanDeclareTable6/save`, para).then(response => {
            console.log(response.data.success)
            if (response.data.success === true) {
              this.$message({
                message: '提交成功',
                type: 'success'
              })
              this.editFormVisible6 = false
              this.editLoading = false
              this.getList6()
            } else {
              console.log('提交失败:' + response.data.message)
              this.$message({
                message: '提交失败:' + response.data.message,
                type: 'error'
              })
              this.editLoading = false
            }
          }).catch(error => {
            console.log(error)
            this.$message({
              message: '提交失败:' + error,
              type: 'error'
            })
            this.editLoading = false
          })
        }
      })
    },
    handleDetail1 (obj, theType, unitBeijing) {
      this.dialogTitle = '修改'
      this.editForm1.id = obj.id
      this.editForm1.unitName = obj.unitName
      this.editForm1.authorizedPersonCount = obj.authorizedPersonCount
      this.editForm1.authorizedLeaderCount = obj.authorizedLeaderCount
      this.editForm1.actualPersonCount = obj.actualPersonCount
      this.editForm1.actualLeaderCount = obj.actualLeaderCount
      this.editForm1.retireesCount = obj.retireesCount
      this.editForm1.lastYearBeijingBachelorCount = obj.lastYearBeijingBachelorCount
      this.editForm1.lastYearBeijingPostgraduateCount = obj.lastYearBeijingPostgraduateCount
      this.editForm1.lastYearBachelorCount = obj.lastYearBachelorCount
      this.editForm1.lastYearPostgraduateCount = obj.lastYearPostgraduateCount
      this.editForm1.thisYearDoctorCount = obj.thisYearDoctorCount
      this.editForm1.thisYearBeijingBachelorCount = obj.thisYearBeijingBachelorCount
      this.editForm1.thisYearBeijingPostgraduateCount = obj.thisYearBeijingPostgraduateCount
      this.editForm1.thisYearBachelorCount = obj.thisYearBachelorCount
      this.editForm1.thisYearPostgraduateCount = obj.thisYearPostgraduateCount
      this.editForm1.thisYearInServicePersonCount = obj.thisYearInServicePersonCount
      this.editForm1.beijingPostgraduateCount = obj.beijingPostgraduateCount
      this.editForm1.remark = obj.remark
      this.theType1 = theType
      this.unitBeijing1 = unitBeijing
      this.editFormVisible1 = true
    },
    handleDetail2 (obj, theType, unitBeijing) {
      this.dialogTitle = '修改'
      this.editForm2.id = obj.id
      this.editForm2.unitName = obj.unitName
      this.editForm2.settleCount1 = obj.settleCount1
      this.editForm2.settleCount2 = obj.settleCount2
      this.editForm2.settleCount3 = obj.settleCount3
      this.editForm2.inPostCount1 = obj.inPostCount1
      this.editForm2.inPostCount2 = obj.inPostCount2
      this.editForm2.inPostCount3 = obj.inPostCount3
      this.editForm2.institutional = JSON.parse(obj.institutional)
      this.editForm2.receiveMode = JSON.parse(obj.receiveMode)
      this.editForm2.receiveModeRemark = obj.receiveModeRemark
      this.editFormVisible2 = true
    },
    handleDetail3 (obj, theType, unitBeijing) {
      this.dialogTitle = '修改'
      this.editForm3.id = obj.id
      this.editForm3.unitName = obj.unitName
      this.editForm3.settleUndergraduateCount1 = obj.settleUndergraduateCount1
      this.editForm3.settleUndergraduateCount2 = obj.settleUndergraduateCount2
      this.editForm3.settleUndergraduateCount3 = obj.settleUndergraduateCount3
      this.editForm3.settleMasterCount1 = obj.settleMasterCount1
      this.editForm3.settleMasterCount2 = obj.settleMasterCount2
      this.editForm3.settleMasterCount3 = obj.settleMasterCount3
      this.editForm3.settleDoctorCount1 = obj.settleDoctorCount1
      this.editForm3.settleDoctorCount2 = obj.settleDoctorCount2
      this.editForm3.settleDoctorCount3 = obj.settleDoctorCount3
      this.editForm3.inPostUndergraduateCount1 = obj.inPostUndergraduateCount1
      this.editForm3.inPostUndergraduateCount2 = obj.inPostUndergraduateCount2
      this.editForm3.inPostUndergraduateCount3 = obj.inPostUndergraduateCount3
      this.editForm3.inPostMasterCount1 = obj.inPostMasterCount1
      this.editForm3.inPostMasterCount2 = obj.inPostMasterCount2
      this.editForm3.inPostMasterCount3 = obj.inPostMasterCount3
      this.editForm3.inPostDoctorCount1 = obj.inPostDoctorCount1
      this.editForm3.inPostDoctorCount2 = obj.inPostDoctorCount2
      this.editForm3.inPostDoctorCount3 = obj.inPostDoctorCount3
      this.unitBeijing3 = unitBeijing
      this.editFormVisible3 = true
    },
    handleDetail4 (obj, theType, unitBeijing) {
      this.dialogTitle = '修改'
      this.editForm4.id = obj.id
      this.editForm4.unitName = obj.unitName
      this.editForm4.theYear = obj.theYear
      this.editForm4.department = obj.department
      this.editForm4.realName = obj.realName
      this.editForm4.idCardNo = obj.idCardNo
      this.editForm4.post = obj.post
      this.editForm4.school = obj.school
      this.editForm4.major = obj.major
      this.editForm4.inPost = obj.inPost
      this.editForm4.inBeijing = obj.inBeijing
      this.editForm4.remark = obj.remark
      this.editFormVisible4 = true
      this.unitBeijing4 = unitBeijing
    },
    handleDetail5 (obj, theType, unitBeijing) {
      this.dialogTitle = '修改'
      this.editForm5.id = obj.id
      this.editForm5.unitName = obj.unitName
      this.editForm5.department = obj.department
      this.editForm5.post = obj.post
      this.editForm5.major = obj.major
      this.editForm5.countBeijing1 = obj.countBeijing1
      this.editForm5.countBeijing2 = obj.countBeijing2
      this.editForm5.countBeijing3 = obj.countBeijing3
      this.editForm5.countBeijing4 = obj.countBeijing4
      this.editForm5.countBeijing5 = obj.countBeijing5
      this.editForm5.count1 = obj.count1
      this.editForm5.count2 = obj.count2
      this.editForm5.count3 = obj.count3
      this.editForm5.count4 = obj.count4
      this.editForm5.count5 = obj.count5
      this.editFormVisible5 = true
      this.unitBeijing5 = unitBeijing
    },
    handleDetail6 (obj, theType, unitBeijing) {
      this.dialogTitle = '修改'
      this.editForm6.id = obj.id
      this.editForm6.unitName = obj.unitName
      this.editForm6.department = obj.department
      this.editForm6.post = obj.post
      this.editForm6.personCount = obj.personCount
      this.editForm6.residenceRequirements = obj.residenceRequirements
      this.editForm6.education = obj.education
      this.editForm6.major = obj.major
      this.editForm6.others = obj.others
      this.editForm6.remark = obj.remark
      this.editForm6.unitBeijing = obj.unitBeijing
      this.editFormVisible6 = true
    },
    handleAdd1 (theType, unitBeijing) {
      this.dialogTitle = '新增'
      this.editForm1.id = null
      this.editForm1.unitName = ''
      this.editForm1.authorizedPersonCount = 0
      this.editForm1.authorizedLeaderCount = 0
      this.editForm1.actualPersonCount = 0
      this.editForm1.actualLeaderCount = 0
      this.editForm1.retireesCount = 0
      this.editForm1.lastYearBeijingBachelorCount = 0
      this.editForm1.lastYearBeijingPostgraduateCount = 0
      this.editForm1.lastYearBachelorCount = 0
      this.editForm1.lastYearPostgraduateCount = 0
      this.editForm1.thisYearDoctorCount = 0
      this.editForm1.thisYearBeijingBachelorCount = 0
      this.editForm1.thisYearBeijingPostgraduateCount = 0
      this.editForm1.thisYearBachelorCount = 0
      this.editForm1.thisYearPostgraduateCount = 0
      this.editForm1.thisYearInServicePersonCount = 0
      this.editForm1.beijingPostgraduateCount = 0
      this.editForm1.remark = ''
      this.theType1 = theType
      this.unitBeijing1 = unitBeijing
      this.editFormVisible1 = true
    },
    handleAdd2 (theType, unitBeijing) {
      this.dialogTitle = '新增'
      this.editForm2.id = null
      this.editForm2.unitName = ''
      this.editForm2.settleCount1 = 0
      this.editForm2.settleCount2 = 0
      this.editForm2.settleCount3 = 0
      this.editForm2.inPostCount1 = 0
      this.editForm2.inPostCount2 = 0
      this.editForm2.inPostCount3 = 0
      this.editForm2.institutional = []
      this.editForm2.receiveMode = []
      this.editForm2.receiveModeRemark = ''
      this.editFormVisible2 = true
    },
    handleAdd3 (theType, unitBeijing) {
      this.dialogTitle = '新增'
      this.editForm3.id = null
      this.editForm3.unitName = ''
      this.editForm3.settleUndergraduateCount1 = 0
      this.editForm3.settleUndergraduateCount2 = 0
      this.editForm3.settleUndergraduateCount3 = 0
      this.editForm3.settleMasterCount1 = 0
      this.editForm3.settleMasterCount2 = 0
      this.editForm3.settleMasterCount3 = 0
      this.editForm3.settleDoctorCount1 = 0
      this.editForm3.settleDoctorCount2 = 0
      this.editForm3.settleDoctorCount3 = 0
      this.editForm3.inPostUndergraduateCount1 = 0
      this.editForm3.inPostUndergraduateCount2 = 0
      this.editForm3.inPostUndergraduateCount3 = 0
      this.editForm3.inPostMasterCount1 = 0
      this.editForm3.inPostMasterCount2 = 0
      this.editForm3.inPostMasterCount3 = 0
      this.editForm3.inPostDoctorCount1 = 0
      this.editForm3.inPostDoctorCount2 = 0
      this.editForm3.inPostDoctorCount3 = 0
      this.unitBeijing3 = unitBeijing
      this.editFormVisible3 = true
    },
    handleAdd4 (theType, unitBeijing) {
      this.dialogTitle = '新增'
      this.editForm4.id = null
      this.editForm4.unitName = ''
      this.editForm4.theYear = ''
      this.editForm4.department = ''
      this.editForm4.realName = ''
      this.editForm4.idCardNo = ''
      this.editForm4.post = ''
      this.editForm4.school = ''
      this.editForm4.major = ''
      this.editForm4.inPost = null
      this.editForm4.inBeijing = null
      this.editForm4.remark = ''
      this.unitBeijing4 = unitBeijing
      this.editFormVisible4 = true
    },
    handleAdd5 (theType, unitBeijing) {
      this.dialogTitle = '新增'
      this.editForm5.id = null
      this.editForm5.unitName = ''
      this.unitBeijing5 = unitBeijing
      this.editForm5.department = ''
      this.editForm5.post = ''
      this.editForm5.major = ''
      this.editForm5.countBeijing1 = 0
      this.editForm5.countBeijing2 = 0
      this.editForm5.countBeijing3 = 0
      this.editForm5.countBeijing4 = 0
      this.editForm5.countBeijing5 = 0
      this.editForm5.count1 = 0
      this.editForm5.count2 = 0
      this.editForm5.count3 = 0
      this.editForm5.count4 = 0
      this.editForm5.count5 = 0
      this.editFormVisible5 = true
    },
    handleAdd6 (theType, unitBeijing) {
      this.dialogTitle = '新增'
      this.editForm6.id = null
      this.editForm6.unitName = ''
      this.editForm6.department = ''
      this.editForm6.post = ''
      this.editForm6.personCount = 0
      this.editForm6.residenceRequirements = ''
      this.editForm6.education = ''
      this.editForm6.major = ''
      this.editForm6.others = ''
      this.editForm6.remark = ''
      this.editForm6.unitBeijing = ''
      this.editFormVisible6 = true
    },
    getList1 () {
      let tableName = 'recruitBusPlanDeclareTable1'
      if (this.type !== 2) {
        this.getListCommon(tableName, 1, 1, 'list1_1')
        this.getListCommon(tableName, 1, 2, 'list1_2')
      }
      if (this.type !== 1) {
        this.getListCommon(tableName, 2, 1, 'list1_3')
        this.getListCommon(tableName, 2, 2, 'list1_4')
      }
    },
    getList2 () {
      let tableName = 'recruitBusPlanDeclareTable2'
      this.getListCommon(tableName, null, null, 'list2')
    },
    getList3 () {
      let tableName = 'recruitBusPlanDeclareTable3'
      this.getListCommon(tableName, null, 1, 'list3_1')
      this.getListCommon(tableName, null, 2, 'list3_2')
    },
    getList4 () {
      let tableName = 'recruitBusPlanDeclareTable4'
      this.getListCommon(tableName, null, 1, 'list4_1')
      this.getListCommon(tableName, null, 2, 'list4_2')
    },
    getList5 () {
      this.getListCommon('recruitBusPlanDeclareTable5', null, 1, 'list5_1')
      this.getListCommon('recruitBusPlanDeclareTable5', null, 2, 'list5_2')
      this.getListCommon('recruitBusPlanDeclareTable6', null, null, 'list6')
    },
    getList6 () {
    },
    getListCommon (tableName, type, beijing, objName) {
      this.listLoading = true
      let para = {
        pageNum: 1,
        pageSize: 1,
        unitBatchId: this.unitBatchId,
        theType: type,
        unitBeijing: beijing
      }
      this.$http.post(this.$http.defaults.recruitAPI + 'api/' + tableName + '/queryByPage', para).then(response => {
        this.listLoading = false
        if (response.data.success === true) {
          this[objName] = response.data.result.records
          this[objName].forEach((item, index, arr) => {
            arr[index].sum1 = item.lastYearBeijingBachelorCount + item.lastYearBeijingPostgraduateCount
            arr[index].sum2 = item.lastYearBachelorCount + item.lastYearPostgraduateCount + item.thisYearDoctorCount
            arr[index].sum3 = item.thisYearBeijingBachelorCount + item.thisYearBeijingPostgraduateCount
            arr[index].sum4 = item.thisYearBachelorCount + item.thisYearPostgraduateCount
            arr[index].prop1 = (arr[index].sum1 + arr[index].sum2) ? (((arr[index].sum1 / (arr[index].sum1 + arr[index].sum2)) * 100).toFixed(1) + '%') : '0%'
            arr[index].prop2 = (arr[index].sum3 + arr[index].sum4) ? (((arr[index].sum3 / (arr[index].sum3 + arr[index].sum4)) * 100).toFixed(1) + '%') : '0%'
            arr[index].sum3_1_1 = item.settleUndergraduateCount1 + item.settleMasterCount1 + item.settleDoctorCount1
            arr[index].sum3_2_1 = item.settleUndergraduateCount2 + item.settleMasterCount2 + item.settleDoctorCount2
            arr[index].sum3_3_1 = item.settleUndergraduateCount3 + item.settleMasterCount3 + item.settleDoctorCount3
            arr[index].sum3_1_2 = item.inPostUndergraduateCount1 + item.inPostMasterCount1 + item.inPostDoctorCount1
            arr[index].sum3_2_2 = item.inPostUndergraduateCount2 + item.inPostMasterCount2 + item.inPostDoctorCount2
            arr[index].sum3_3_2 = item.inPostUndergraduateCount3 + item.inPostMasterCount3 + item.inPostDoctorCount3
            arr[index].prop3_1 = (arr[index].sum3_1_1) ? (((arr[index].sum3_1_2 / arr[index].sum3_1_1) * 100).toFixed(1) + '%') : '0%'
            arr[index].prop3_2 = (arr[index].sum3_2_1) ? (((arr[index].sum3_2_2 / arr[index].sum3_2_1) * 100).toFixed(1) + '%') : '0%'
            arr[index].prop3_3 = (arr[index].sum3_3_1) ? (((arr[index].sum3_3_2 / arr[index].sum3_3_1) * 100).toFixed(1) + '%') : '0%'
            arr[index].sum5_1 = item.countBeijing1 + item.countBeijing2 + item.countBeijing3 + item.countBeijing4 + item.countBeijing5
            arr[index].sum5_2 = item.count1 + item.count2 + item.count3 + item.count4 + item.count5
          })
        } else {
          console.log('获取数据失败:' + response.data.message)
          this.$message({
            message: '获取数据失败:' + response.data.message,
            type: 'error'
          })
        }
      }).catch(error => {
        console.log(error)
        this.$message({
          message: '网络获取失败:' + error,
          type: 'error'
        })
        this.listLoading = false
      })
    },
    handleDel1 (id) {
      let tableName = 'recruitBusPlanDeclareTable1'
      this.delCommon(tableName, id)
    },
    handleDel2 (id) {
      let tableName = 'recruitBusPlanDeclareTable2'
      this.delCommon(tableName, id)
    },
    handleDel3 (id) {
      let tableName = 'recruitBusPlanDeclareTable3'
      this.delCommon(tableName, id)
    },
    handleDel4 (id) {
      let tableName = 'recruitBusPlanDeclareTable4'
      this.delCommon(tableName, id)
    },
    handleDel5 (id) {
      let tableName = 'recruitBusPlanDeclareTable5'
      this.delCommon(tableName, id)
    },
    handleDel6 (id) {
      let tableName = 'recruitBusPlanDeclareTable6'
      this.delCommon(tableName, id)
    },
    delCommon (tableName, id) {
      this.$confirm('确认删除该记录吗?', '提示', {
        type: 'warning'
      }).then(() => {
        let para = {ids: [id]}
        this.listLoading = true
        this.$http.post(this.$http.defaults.recruitAPI + 'api/' + tableName + '/remove', para).then(response => {
          if (response.data.success === true) {
            this.addLoading = false
            this.$message({
              message: '删除成功',
              type: 'success'
            })
          } else {
            console.log('删除失败:' + response.data.message)
            this.$message({
              message: '删除失败:' + response.data.message,
              type: 'error'
            })
          }
          switch (tableName) {
            case 'recruitBusPlanDeclareTable1':
              this.getList1()
              break
            case 'recruitBusPlanDeclareTable2':
              this.getList2()
              break
            case 'recruitBusPlanDeclareTable3':
              this.getList3()
              break
            case 'recruitBusPlanDeclareTable4':
              this.getList4()
              break
            case 'recruitBusPlanDeclareTable5':
              this.getList5()
              break
            case 'recruitBusPlanDeclareTable6':
              this.getList6()
              break
          }
        })
          .catch(error => {
            console.log(error)
            this.$message({
              message: '删除失败:' + error,
              type: 'error'
            })
          })
      })
    },
    beforeUpload (file) {
      console.log('文件类型')
      console.log(file.name)
      const isFormat = file.name.indexOf('.docx') > 0 || file.name.indexOf('.doc') > 0 || file.name.indexOf('.pdf') > 0 || file.name.indexOf('.DOCX') > 0 || file.name.indexOf('.DOC') > 0 || file.name.indexOf('.PDF') > 0 || file.name.indexOf('.wps') > 0 || file.name.indexOf('.WPS') > 0
      const isLt500M = file.size / 1024 / 1024 < 60
      if (!isLt500M) {
        this.$message.error('单个附件不能超过60M!')
      } else {
        this.saveloading = true
      }
      if (!isFormat) {
        this.$message.error('附件格式必须为word、pdf、wps!')
      } else {
        this.saveloading = true
      }
      return isFormat && isLt500M
    },
    async handleUploadSucc1 (response, file, fileList) {
      this.uploadSuccCommon(response, file, fileList, 'bus_plan_declare_table1_1', 'files1_1')
    },
    async handleUploadSucc1_2 (response, file, fileList) {
      this.uploadSuccCommon(response, file, fileList, 'bus_plan_declare_table1_2', 'files1_2')
    },
    async handleUploadSucc2 (response, file, fileList) {
      this.uploadSuccCommon(response, file, fileList, 'bus_plan_declare_table2', 'files2')
    },
    async handleUploadSucc3 (response, file, fileList) {
      this.uploadSuccCommon(response, file, fileList, 'bus_plan_declare_table3', 'files3')
    },
    async handleUploadSucc4 (response, file, fileList) {
      this.uploadSuccCommon(response, file, fileList, 'bus_plan_declare_table4', 'files4')
    },
    async handleUploadSucc5 (response, file, fileList) {
      this.uploadSuccCommon(response, file, fileList, 'bus_plan_declare_table5', 'files5')
    },
    async handleUploadSucc6 (response, file, fileList) {
      this.uploadSuccCommon(response, file, fileList, 'bus_plan_declare_table6', 'files6')
    },
    uploadSuccCommon (response, file, fileList, stepName, objName) {
      if (response.success) {
        let para = {
          id: response.result[0].id,
          businessId: this.unitBatchId,
          businessTable: 'bus_unit_batch',
          businessStep: stepName
        }
        this.$http.post(this.$http.defaults.recruitAPI + `api/recruitGenFileInfo/save`, para).then(res => {
          this.saveloading = false
          if (res.data.success === true) {
            this.$message({
              message: '上传成功！',
              type: 'success'
            })
            this.getFileList(stepName, objName)
          } else {
            console.log('上传失败:' + res.data.message)
            this.$message({
              message: '上传失败:' + res.data.message,
              type: 'error'
            })
          }
        })
          .catch(error => {
            this.saveloading = false
            console.log(error)
            this.$message({
              message: '上传失败:' + error,
              type: 'error'
            })
          })
      } else {
        this.saveloading = false
        this.$message({
          message: '上传失败:' + response.message,
          type: 'error'
        })
      }
    },
    beforeRemove (file, stepName, objName) {
      this.$confirm('确定删除' + file.fileName + '.' + file.fileType + '？', '提示', {
        type: 'warning'
      }).then(() => {
        this.handleRemove(file.id, stepName, objName)
      })
    },
    handleRemove (id, stepName, objName) {
      const url = 'api/recruitGenFileInfo/remove?id=' + id
      this.$http.get(this.$http.defaults.recruitAPI + url).then(res => {
        console.log('删除成功:', res)
        if (res.data.success === true) {
          this.getFileList(stepName, objName)
          this.$message({
            message: '删除成功！',
            type: 'success'
          })
        }
      })
    },
    uploadError (err) {
      this.saveloading = false
      console.log(err)
      this.$message({
        message: '上传失败:' + err,
        type: 'error'
      })
    },
    download (id) {
      window.open(this.$http.defaults.baseURL + this.$http.defaults.recruitAPI + 'api/recruitGenFileInfo/download?id=' + id)
    },
    getFileList (stepName, objName) {
      this.fileListLoading = true
      let para = {
        businessId: this.unitBatchId,
        businessStep: stepName,
        businessTable: 'bus_unit_batch'
      }
      this.$http.post(this.$http.defaults.recruitAPI + `api/recruitGenFileInfo/getFiles`, para).then(response => {
        this.fileListLoading = false
        if (response.data.success === true) {
          this[objName] = response.data.result
        } else {
          console.log('获取失败:' + response.data.message)
          this.$message({
            message: '获取失败:' + response.data.message,
            type: 'error'
          })
        }
      }).catch(error => {
        console.log(error)
        this.$message({
          message: '网络获取失败:' + error,
          type: 'error'
        })
        this.fileListLoading = false
      })
    },
    getNum (i) {
      return i < 10 ? '0' + i : i
    },
    setState (state) {
      // if (this.list1.length === 0 && this.list2.length === 0 && this.list3.length === 0 && this.files.length === 0) {
      //   this.$message({
      //     message: '操作失败:您未填写任何信息',
      //     type: 'error'
      //   })
      //   return false
      // }
      this.$confirm('确认' + (state === 1 ? '提交' : '退回') + '吗?', '提示', {
        type: 'warning'
      }).then(() => {
        var date = new Date() // 获取时间
        var year = date.getFullYear() // 获取年
        var month = date.getMonth() + 1 // 获取月
        var strDate = date.getDate() // 获取日
        let myDate = year + '-' + this.getNum(month) + '-' + this.getNum(strDate)
        let para = {
          planDeclareState: state,
          id: this.unitBatchId,
          planDeclareNew: 1,
          planDeclareSubmitTime: myDate
        }
        if (state === 5) {
          para.planDeclareRemark = this.backForm.remark
        }
        this.btnLoading = true
        this.$http.post(this.$http.defaults.recruitAPI + `api/recruitBusUnitBatch/save`, para).then(response => {
          this.btnLoading = false
          if (response.data.success === true) {
            this.$message({
              message: '操作成功',
              type: 'success'
            })
            this.$emit('getDetails')
          } else {
            console.log('操作失败:' + response.data.message)
            this.$message({
              message: '操作失败:' + response.data.message,
              type: 'error'
            })
          }
        }).catch(error => {
          this.btnLoading = false
          console.log(error)
          this.$message({
            message: '操作失败:' + error,
            type: 'error'
          })
        })
      })
    },
    tabClick () {
      switch (this.activeName) {
        case '1':
          this.getList1()
          break
        case '2':
          this.getList1()
          break
        case '3':
          this.getList2()
          break
        case '4':
          this.getList3()
          break
        case '5':
          this.getList4()
          break
        case '6':
          this.getList5()
          break
        case '7':
          this.getList6()
          break
      }
    }
  },
  mounted () {
    this.init()
  }
}
</script>
<style scoped>
  .mytable{
    border-top: 1px solid #74a6cc;
    border-left: 1px solid #74a6cc;
    margin:0 10px 10px;
    width: calc(100% - 20px);
  }
  .mytable th{
    padding: 10px;
    border-right: 1px solid #74a6cc;
    border-bottom: 1px solid #74a6cc;
    vertical-align: top;
    line-height: 150%;
    background: #FAFAFA;
    width:200px;
    text-align:right;
  }
  .mytable td{
    padding: 10px;
    border-right: 1px solid #74a6cc;
    border-bottom: 1px solid #74a6cc;
    vertical-align: top;
    line-height: 150%;
  }
</style>
<style>
#recruitTable .el-table{
  border:1px solid #95B8E7 !important;
}
#recruitTable .el-table td, #recruitTable .el-table th{
  border-right:1px solid #95B8E7 !important;
  border-bottom:1px solid #95B8E7 !important;
}
</style>
